-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
@aws-cdk/custom-resources: adding tagging to resource creation causes deployment errors #29816
Comments
Can you share your error message? |
And what if you specify that with a static value like this? Are you still having the error?
|
Here is the error message: If I add the connect permission or even admin permissions it gives the same error as well. If I use a static value like this: |
It's not clear to me how |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
rendered_tags is supposed to be able to get the tags applied to the stack so those tags can be added to custom resources since the tags won't be automatically applied if set at the stack level for those custom resources. |
@cjhelloletsgo I think this is happening because adding tags is triggering an update. Since you're depending on the ARN from For example, you're trying to access
However, you don't have an update SDK call configured for |
I'm pretty sure it does it even when creating a new resource but I could be mistaken. I will try that out and report back on Friday. |
@cjhelloletsgo thanks. Let us know! |
I tried creating this resource fresh connect_cases_app_integration_association_custom_resource = custom_resources.AwsCustomResource(
self,
"Connect Cases App Integration Association Custom Resource",
on_create=custom_resources.AwsSdkCall(
service="@aws-sdk/client-connect",
action="CreateIntegrationAssociationCommand",
parameters={
"InstanceId": connect_instance.attr_id,
"IntegrationArn": connect_case_app_integration_custom_resource.get_response_field(
"EventIntegrationArn"
),
"IntegrationType": "EVENT",
"SourceType": "CASES",
# Apr 12 2024 - Tags Cause an error with this custom resource for some reason
"Tags": self.tags.rendered_tags,
},
physical_resource_id=custom_resources.PhysicalResourceId.from_response(
"IntegrationAssociationId"
),
logging=custom_resources.Logging.all(),
),
on_delete=custom_resources.AwsSdkCall(
service="@aws-sdk/client-connect",
action="DeleteIntegrationAssociationCommand",
parameters={
"InstanceId": connect_instance.attr_id,
"IntegrationAssociationId": custom_resources.PhysicalResourceIdReference(),
},
logging=custom_resources.Logging.all(),
),
policy=custom_resources.AwsCustomResourcePolicy.from_sdk_calls(
resources=custom_resources.AwsCustomResourcePolicy.ANY_RESOURCE
),
timeout=Duration.minutes(2),
log_group=custom_resource_log_group,
install_latest_aws_sdk=False,
) and received this error: |
Describe the bug
Creating a custom resource with tagging causes errors with some resource types, the example below all deploy with no problems but fail when the tag parameter is added.
Expected Behavior
Tags should be added
Current Behavior
A deployment failure
Reproduction Steps
Create a custom resource without tags, it works fine. Create a custom resource with tags it fails to deploy.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.137.0 (build bb90b4c)
Framework Version
No response
Node.js Version
v18.13.0
OS
Ubuntu 23.10
Language
Python
Language Version
3.11
Other information
No response
The text was updated successfully, but these errors were encountered: