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

awscc_iotwireless_wireless_gateway resource not updating AWS tags #1966

Open
gagan1469 opened this issue Aug 22, 2024 · 0 comments
Open

awscc_iotwireless_wireless_gateway resource not updating AWS tags #1966

gagan1469 opened this issue Aug 22, 2024 · 0 comments

Comments

@gagan1469
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

  • Terraform v1.6.2
  • Installed hashicorp/awscc v1.7.0 (signed by HashiCorp)

Affected Resource(s)

  • awscc_iotwireless_wireless_gateway

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

# read config
locals {
  gateways = csvdecode(file("./iot_wireless_gateways/gateways.csv"))
  gw_map = tomap({ for gw in local.gateways: gw.gateway_eui => gw})
}

# create wireless gateways
resource "awscc_iotwireless_wireless_gateway" "gateway" {
    for_each = local.gw_map
    lo_ra_wan = {
      gateway_eui = each.value.gateway_eui
      rf_region = each.value.rf_region
    }
    name = each.value.gateway_name
    description = each.value.description
    tags = var.awscc_tags
}

variable "awscc_tags" {
    description = "AWS resource tags for AWSCC provider"
    type = set(object({
      key = string
      value = string
    }))
}

Note: awscc_tags are read in from a yaml file. The awscc_tags are:

awscc_tags = [
            {
                key   = "addedDate"
                value = "2024-08-20T00:00:00Z"
            },
            {
                key   = "solution"
                value = "field solution"
            },
          + {
              + key   = "addedBy"
              + value = "Automation Terraform AzDO"
            },
          + {
              + key   = "environment"
              + value = "dev"
            },
        ]

Debug Output

Panic Output

Expected Behavior

Terraform detects that environment and addedBy key values have changed and updates these. The updated values are seen in the AWS console. (Note: This is the behaviour happening for aws provider resources, such as aws_iam_policy.)

Actual Behavior

Terraform detects that environment and addedBy key values have changed. The Terraform plan output indicates the same and the Terraform apply output indicates that the update has been done. But looking at the resource in the console, the tag values have not been updated (even after several minutes/hours).

module.iot_wireless_gateways.awscc_iotwireless_wireless_gateway.gateway["2080000000029822"]: Modifications complete after 5s [id=509f8394-41bc-4943-a728-5d3790de5a6a]
module.iot_wireless_gateways.awscc_iotwireless_wireless_gateway.gateway["1080000000029823"]: Modifications complete after 5s [id=35e03730-c2e1-4468-bed1-dfcea3169b29]

Apply complete! Resources: 0 added, 2 changed, 0 destroyed.

Outputs:
tags = {
        addedBy     = "Automation Terraform AzDO"
        addedDate   = "2024-08-20T00:00:00Z"
        environment = "dev"
        solution    = "field solution"
    }

Steps to Reproduce

  1. terraform apply

Important Factoids

References

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

No branches or pull requests

1 participant