-
Notifications
You must be signed in to change notification settings - Fork 547
feat(resources): Add Support for Cloudformation Stack Instance Summaries and Stack Instance Resource Drifts #12495
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
Conversation
…s` and `aws_cloudformation_stack_instance_resource_drifts`
This PR has the following changes to source plugin(s) tables:
|
| stackSet := parent.Parent.Item.(models.ExpandedStackSet) | ||
| instance := parent.Item.(models.ExpandedStackInstanceSummary) | ||
| config := cloudformation.ListStackInstanceResourceDriftsInput{ | ||
| OperationId: instance.LastOperationId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if using LastOperationId is correct (it works, but not sure if it would be enough for use cases etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are doing it correctly
| Description: `https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_StackSetOperationResultSummary.html. | ||
| The 'request_account_id' and 'request_region' columns are added to show the account and region of where the request was made from.`, | ||
| Resolver: fetchStackInstanceResourceDrifts, | ||
| Transform: transformers.TransformWithStruct(&types.StackInstanceResourceDriftsSummary{}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left out PKs from the table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use all of the inputs (minus CallAs) as pks + logical_resource_id or physical_resource_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think logical and physical both need to be used in that case, but it gets complicated:
// Context information that enables CloudFormation to uniquely identify a
// resource. CloudFormation uses context key-value pairs in cases where a
// resource's logical and physical IDs aren't enough to uniquely identify that
// resource. Each context key-value pair specifies a unique resource that contains
// the targeted resource.
PhysicalResourceIdContext []PhysicalResourceIdContextKeyValuePairThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we don't need to uniquely identify a resource in a region/account, we just need to uniquely identify a resource within a specific stack (unless I am missing something)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I gave it a go in 7c7e059 (#12495). Account and region seems to be filled in in the stack set arn and stack id (different accounts/regions too) so I've omitted those from the PK.
aws_cloudformation_stack_instance_summaries and aws_cloudformation_stack_instance_resource_driftsaws_cloudformation_stack_instance_summaries and aws_cloudformation_stack_instance_resource_drifts
aws_cloudformation_stack_instance_summaries and aws_cloudformation_stack_instance_resource_drifts
bbernays
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🤖 I have created a release *beep* *boop* --- ## [22.2.0](plugins-source-aws-v22.1.0...plugins-source-aws-v22.2.0) (2023-07-27) ### This Release has the Following Changes to Tables - Table `aws_cloudformation_stack_instance_resource_drifts` was added - Table `aws_cloudformation_stack_instance_summaries` was added - Table `aws_emr_studio_session_mappings` was added - Table `aws_emr_studios` was added - Table `aws_route53recoverycontrolconfig_clusters` was added - Table `aws_route53recoverycontrolconfig_control_panels` was added - Table `aws_route53recoverycontrolconfig_routing_controls` was added - Table `aws_route53recoverycontrolconfig_safety_rules` was added - Table `aws_route53recoveryreadiness_cells` was added - Table `aws_route53recoveryreadiness_readiness_checks` was added - Table `aws_route53recoveryreadiness_recovery_groups` was added - Table `aws_route53recoveryreadiness_resource_sets` was added - Table `aws_s3_multi_region_access_points` was added ### Features * **resources-s3:** Add support for S3 Multi Region Access Points ([#12525](#12525)) ([00c6a3f](00c6a3f)) * **resources:** Add additional emr resources for studio and studio session mapping ([#12529](#12529)) ([66a20a5](66a20a5)) * **resources:** Add Support for Amazon Route 53 ARC Recovery Control Configuration ([#12460](#12460)) ([8c3109b](8c3109b)) * **resources:** Add Support for Cloudformation Stack Instance Summaries and Stack Instance Resource Drifts ([#12495](#12495)) ([e1d9a74](e1d9a74)), closes [#12461](#12461) * **resources:** Add Support for Route53 ARC Recovery Readiness ([#12459](#12459)) ([7d6d4c0](7d6d4c0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Currently untestedSeems to be working.Fixes #12461