citizensadvice / cdk-changeset-reporter

Gather and report changeset information for CFN changesets created by the CDK
Apache License 2.0
0 stars 0 forks source link

Add table generator #1

Closed MatthewCane closed 1 year ago

MatthewCane commented 1 year ago

@zhelyan Example output for WB2:

Changeset for stack staging-witnessboxv2ApplicationBucket7EDF3DC0 | Action | Resource Type | Logical Resource Id | Change Target | Change Reason | Requires Recreation | |--------|-----------------------|---------------------|----------------|--------------------|---------------------| | Modify | AWS::S3::BucketPolicy | Policy23B91518 | PolicyDocument | ResourceAttribute | Never | | Modify | AWS::S3::Bucket | Resource | BucketName | DirectModification | Always |
Changeset for stack staging-witnessbox-v2 | Action | Resource Type | Logical Resource Id | Change Target | Change Reason | Requires Recreation | |--------|---------------------------------------|---------------------------------------------------------------------------------------|---------------------|--------------------|---------------------| | Add | AWS::Lambda::Function | AWS679f53fac002430cb0da5b7982bd22872D164C4C | | | | | Add | AWS::IAM::Role | AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2 | | | | | Add | AWS::Lambda::Function | AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57 | | | | | Add | AWS::IAM::Role | AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867 | | | | | Add | Custom::AWSCDKCfnJson | ChartDeploymentExternalSecretsKubernetesServiceAccountConditionJson12CE3722 | | | | | Add | AWS::IAM::Role | ChartDeploymentExternalSecretsKubernetesServiceAccountRole74813D49 | | | | | Add | AWS::IAM::Policy | ChartDeploymentExternalSecretsKubernetesServiceAccountRoleDefaultPolicyAE37B230 | | | | | Add | Custom::AWSCDK-EKS-KubernetesResource | ChartDeploymentExternalSecretsKubernetes(...)iceAccountServiceAccountResource9B9BA39B | | | | | Add | Custom::AWSCDKCfnJson | ChartDeploymentServiceAccountConditionJson1AD5BA5C | | | | | Add | AWS::IAM::Role | ChartDeploymentServiceAccountRole0BA564D2 | | | | | Add | Custom::AWSCDK-EKS-KubernetesResource | ChartDeploymentServiceAccountmanifestServiceAccountServiceAccountResource0F4164EA | | | | | Add | AWS::Lambda::LayerVersion | EksClusterIntegrationKubectlLayer86801FB2 | | | | | Add | Custom::AWS | EksClusterIntegrationOidcConfigNameLookup1A4159C9 | | | | | Add | AWS::IAM::Policy | EksClusterIntegrationOidcConfigNameLookupCustomResourcePolicyA6FF0590 | | | | | Add | Custom::AWSCDK-EKS-KubernetesResource | EksClusterIntegrationprodekscontrolplaneApplicationChartDeployAD4803EB | | | | | Add | AWS::CloudFormation::Stack | stagingwitnessboxv2EksClusterIntegration(...)bectlProviderNestedStackResource20922409 | | | | | Modify | AWS::CDK::Metadata | CDKMetadata | Analytics | DirectModification | Conditionally | | Modify | AWS::EC2::SecurityGroup | RedisCacheRedisSecurityGroup7B1651E1 | GroupDescription | DirectModification | Always | | Modify | AWS::ElastiCache::CacheCluster | RedisCache | VpcSecurityGroupIds | ResourceAttribute | Never |
Changeset for stack staging-witnessboxv2K8sDeploymentRole19F45F18 | Action | Resource Type | Logical Resource Id | Change Target | Change Reason | Requires Recreation | |--------|--------------------|---------------------------|---------------|---------------|---------------------| | Add | AWS::CDK::Metadata | CDKMetadata | | | | | Add | AWS::IAM::Role | K8sDeploymentRoleB690FC9E | | | |
Changeset for stack staging-witnessboxv2NetworkingResourcesFD7ED534 | Action | Resource Type | Logical Resource Id | Change Target | Change Reason | Requires Recreation | |--------|--------------------|---------------------|---------------|--------------------|---------------------| | Modify | AWS::CDK::Metadata | CDKMetadata | Analytics | DirectModification | Conditionally |
zhelyan commented 1 year ago

@MatthewCane that's cool! Do you think we should highlight replacements? Apparently GH support Tex so we can print replacements in e.g red e.g

$\color{red}{\textsf{OMG IT WILL BE REPLACED!!!}}$

zhelyan commented 1 year ago

or use different row background if possible?

MatthewCane commented 1 year ago

For sure, I'll give it a go 😀

MatthewCane commented 1 year ago

@zhelyan The colours were not as alarming as they could be, how does Emoji sit with you?

Changeset for stack staging-witnessboxv2ApplicationBucket7EDF3DC0 (🚨 resources requires recreation 🚨) | Action | Resource Type | Logical Resource Id | Change Target | Change Reason | Requires Recreation | |--------|-----------------------|---------------------|----------------|--------------------|---------------------| | Modify | AWS::S3::BucketPolicy | Policy23B91518 | PolicyDocument | ResourceAttribute | Never | | Modify | AWS::S3::Bucket | Resource | BucketName | DirectModification | 🚨Always🚨 |
Changeset for stack staging-witnessbox-v2 (🚨 resources requires recreation 🚨) | Action | Resource Type | Logical Resource Id | Change Target | Change Reason | Requires Recreation | |--------|---------------------------------------|---------------------------------------------------------------------------------------|---------------------|--------------------|---------------------| | Add | AWS::Lambda::Function | AWS679f53fac002430cb0da5b7982bd22872D164C4C | | | | | Add | AWS::IAM::Role | AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2 | | | | | Add | AWS::Lambda::Function | AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57 | | | | | Add | AWS::IAM::Role | AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867 | | | | | Add | Custom::AWSCDKCfnJson | ChartDeploymentExternalSecretsKubernetesServiceAccountConditionJson12CE3722 | | | | | Add | AWS::IAM::Role | ChartDeploymentExternalSecretsKubernetesServiceAccountRole74813D49 | | | | | Add | AWS::IAM::Policy | ChartDeploymentExternalSecretsKubernetesServiceAccountRoleDefaultPolicyAE37B230 | | | | | Add | Custom::AWSCDK-EKS-KubernetesResource | ChartDeploymentExternalSecretsKubernetes(...)iceAccountServiceAccountResource9B9BA39B | | | | | Add | Custom::AWSCDKCfnJson | ChartDeploymentServiceAccountConditionJson1AD5BA5C | | | | | Add | AWS::IAM::Role | ChartDeploymentServiceAccountRole0BA564D2 | | | | | Add | Custom::AWSCDK-EKS-KubernetesResource | ChartDeploymentServiceAccountmanifestServiceAccountServiceAccountResource0F4164EA | | | | | Add | AWS::Lambda::LayerVersion | EksClusterIntegrationKubectlLayer86801FB2 | | | | | Add | Custom::AWS | EksClusterIntegrationOidcConfigNameLookup1A4159C9 | | | | | Add | AWS::IAM::Policy | EksClusterIntegrationOidcConfigNameLookupCustomResourcePolicyA6FF0590 | | | | | Add | Custom::AWSCDK-EKS-KubernetesResource | EksClusterIntegrationprodekscontrolplaneApplicationChartDeployAD4803EB | | | | | Add | AWS::CloudFormation::Stack | stagingwitnessboxv2EksClusterIntegration(...)bectlProviderNestedStackResource20922409 | | | | | Modify | AWS::CDK::Metadata | CDKMetadata | Analytics | DirectModification | Conditionally | | Modify | AWS::EC2::SecurityGroup | RedisCacheRedisSecurityGroup7B1651E1 | GroupDescription | DirectModification | 🚨Always🚨 | | Modify | AWS::ElastiCache::CacheCluster | RedisCache | VpcSecurityGroupIds | ResourceAttribute | Never |
Changeset for stack staging-witnessboxv2K8sDeploymentRole19F45F18 | Action | Resource Type | Logical Resource Id | Change Target | Change Reason | Requires Recreation | |--------|--------------------|---------------------------|---------------|---------------|---------------------| | Add | AWS::CDK::Metadata | CDKMetadata | | | | | Add | AWS::IAM::Role | K8sDeploymentRoleB690FC9E | | | |
Changeset for stack staging-witnessboxv2NetworkingResourcesFD7ED534 | Action | Resource Type | Logical Resource Id | Change Target | Change Reason | Requires Recreation | |--------|--------------------|---------------------|---------------|--------------------|---------------------| | Modify | AWS::CDK::Metadata | CDKMetadata | Analytics | DirectModification | Conditionally |
MatthewCane commented 1 year ago

I am ignoring the Conditionally state, but as far as I can see that is only for CDK metadata?

zhelyan commented 1 year ago

haha, awesome! Any resource can be reported as a "conditional' replacement so let's include these too