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

cdktf-provider-aws: tags fields should accept IResolvable values #3696

Open
1 task
jdraymon opened this issue Aug 8, 2024 · 1 comment
Open
1 task

cdktf-provider-aws: tags fields should accept IResolvable values #3696

jdraymon opened this issue Aug 8, 2024 · 1 comment
Labels
bug Something isn't working new Un-triaged issue pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager

Comments

@jdraymon
Copy link

jdraymon commented Aug 8, 2024

Expected Behavior

AwsProviderDefaultTags(tags) accepts as input a cdktf StringMap

Actual Behavior

Output of ServicecatalogappregistryApplication.application_tag is a cdktf.StringMap, but the AwsProviderDefaultTags only accepts Mapping[str,str] as input to tags attribute. The fixed string input precludes the use of any cross-stack / dynamic tag value in a provider.

The Python format documentation for use of ServicecatalogappregistryApplication is incorrect as a result

Steps to Reproduce

  1. Create a ServicecatalogappregistryApplication
application = ServicecatalogappregistryApplication(
            self,
            "aws-myapplication",
            name=config.network.domain_name,
            description="Mojito monitoring application",
        )
  1. Attempt to use the output of that application as a Tag on any AWS resource:
Vpc(
  self,
  "my-vpc",
  cidr_block="10.0.4.0/24",
  enable_dns_support=True,
  enable_dns_hostnames=True,
  tags=application.application_tag,
)

Versions

cdktf-cdktf-provider-aws (PREBUILT)
        terraform provider version: 5.61.0 
        prebuilt provider version: 19.29.0
        cdktf version: ^0.20.0
cdktf-cdktf-provider-helm (PREBUILT)
        terraform provider version: 2.14.0 
        prebuilt provider version: 10.2.0
        cdktf version: ^0.20.0
cdktf-cdktf-provider-kubernetes (PREBUILT)
        terraform provider version: 2.31.0 
        prebuilt provider version: 11.6.0
        cdktf version: ^0.20.0
cdktf-cdktf-provider-null (PREBUILT)
        terraform provider version: 3.2.2 
        prebuilt provider version: 10.0.0
        cdktf version: ^0.20.0
cdktf-cdktf-provider-random (PREBUILT)
        terraform provider version: 3.6.2 
        prebuilt provider version: 11.0.2
        cdktf version: ^0.20.0
cdktf-cdktf-provider-tls (PREBUILT)
        terraform provider version: 4.0.5 
        prebuilt provider version: 10.0.0
        cdktf version: ^0.20.0

Providers

┌───────────────────┬──────────────────┬─────────┬────────────┬─────────────────────────────────┬─────────────────┐
│ Provider Name     │ Provider Version │ CDKTF   │ Constraint │ Package Name                    │ Package Version │
├───────────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────────┼─────────────────┤
│ tailsdotcom/scram │ 0.2.0            │         │ ~> 0.2     │                                 │                 │
├───────────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────────┼─────────────────┤
│ aws               │ 5.61.0           │ ^0.20.0 │            │ cdktf-cdktf-provider-aws        │ 19.29.0         │
├───────────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────────┼─────────────────┤
│ helm              │ 2.14.0           │ ^0.20.0 │            │ cdktf-cdktf-provider-helm       │ 10.2.0          │
├───────────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────────┼─────────────────┤
│ kubernetes        │ 2.31.0           │ ^0.20.0 │            │ cdktf-cdktf-provider-kubernetes │ 11.6.0          │
├───────────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────────┼─────────────────┤
│ null              │ 3.2.2            │ ^0.20.0 │            │ cdktf-cdktf-provider-null       │ 10.0.0          │
├───────────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────────┼─────────────────┤
│ random            │ 3.6.2            │ ^0.20.0 │            │ cdktf-cdktf-provider-random     │ 11.0.2          │
├───────────────────┼──────────────────┼─────────┼────────────┼─────────────────────────────────┼─────────────────┤
│ tls               │ 4.0.5            │ ^0.20.0 │            │ cdktf-cdktf-provider-tls        │ 10.0.0          │
└───────────────────┴──────────────────┴─────────┴────────────┴─────────────────────────────────┴─────────────────┘

Gist

No response

Possible Solutions

No response

Workarounds

No response

Anything Else?

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

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
@jdraymon jdraymon added bug Something isn't working new Un-triaged issue pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager labels Aug 8, 2024
@jdraymon
Copy link
Author

jdraymon commented Aug 9, 2024

Realistically I might want to use resolvables for any tag value, not just the AWS Default ones - and it's something I can do in HCL but not in the CDKTF

@jdraymon jdraymon changed the title cdktf-provider-aws: AwsProviderDefaultTags should accept resolvable values cdktf-provider-aws: tags fields should accept resolvable values Aug 12, 2024
@jdraymon jdraymon changed the title cdktf-provider-aws: tags fields should accept resolvable values cdktf-provider-aws: tags fields should accept IRresolvable values Aug 12, 2024
@jdraymon jdraymon changed the title cdktf-provider-aws: tags fields should accept IRresolvable values cdktf-provider-aws: tags fields should accept IResolvable values Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new Un-triaged issue pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager
Projects
None yet
Development

No branches or pull requests

1 participant