Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add a security group as a whitelist on a alicloud_redis_tair_instance #7047

Open
vgazzola opened this issue Mar 11, 2024 · 1 comment

Comments

@vgazzola
Copy link

vgazzola commented Mar 11, 2024

Hi there,
I was able to whitelist a security group on a redis Tair instance on the web console, but not on terraform. it doesn't seem possible at the moment

Terraform Version

OpenTofu v1.6.1 (but it's not linked to terraform/openTofu, rather with the aiyun/alicloud provider

terraform {
  required_providers {
    alicloud = {
      source = "aliyun/alicloud"
      version = "1.218.0"
    }
  }
}

Affected Resource(s)

Please list the resources as a list, for example:

  • alicloud_redis_tair_instance
  • alicloud_security_group

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "alicloud_security_group" "security-group" {
  name                = local.nsg_name
  vpc_id              = alicloud_vpc.vpc.id
  security_group_type = "enterprise"
  resource_group_id   = alicloud_resource_manager_resource_group.vpc-rg.id
  inner_access_policy = "Accept"
  tags                = local.tags
}

resource "alicloud_redis_tair_instance" "redis" {
  instance_class            = var.redis_instance_class
  resource_group_id         = alicloud_resource_manager_resource_group.redis.id
  payment_type              = "PayAsYouGo"
  auto_renew                = "false"
  engine_version            = "6.0"
  vpc_id                    = alicloud_vswitch.redis.vpc_id
  force_upgrade             = "false"
  instance_type             = "tair_rdb"
  zone_id                   = alicloud_vswitch.redis.zone_id
  port                      = "6379"
  tair_instance_name        = local.redis_name
  vswitch_id                = alicloud_vswitch.redis.id
  auto_renew_period         = "1"
}

Debug Output

works in the console, no option in terraform

Panic Output

Expected Behavior

I'd like to be able to associate a alicloud_security_group on a alicloud_redis_tair_instance resource like we can do on the web console, or like it could be done on a alicloud_kvstore_instance
Console:
Screenshot 2024-03-11 at 15 52 30
alicloud_kvstore_instance:

resource "alicloud_kvstore_instance" "default" {

  security_group_id = "sg-***"

Actual Behavior

Seemingly not possible at the moment :

References

no other GitHub issues yet.

@vgazzola
Copy link
Author

There seem to be a similar problem with the TLS config, there's no option to enable it on Terraform, only on the console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant