在CloudFormation中获取最新版本的AWS::MSK::Configuration



我正在尝试创建一个带有MSK配置的cloudFormation堆栈,并将MSK配置与MSK集群相关联。创建AWS::MSK::Configuration只返回ARN,而我需要ARN和修订号来将MSK Configuration关联到MSK Cluster。有什么办法做到这一点吗?目前我正在将其硬编码为1,这意味着它只适用于创建堆栈。

...
MSKConfiguration:
Type: AWS::MSK::Configuration
Properties:
Name: aws-msk-configuration
ServerProperties: |
auto.create.topics.enable = true
zookeeper.connection.timeout.ms = 1000
log.roll.ms = 604800000
MSKCluster:
Type: AWS::MSK::Cluster
Properties:
ClusterName: !Ref ClusterName
ClientAuthentication: !If
- UsingIamAuthentication
- Sasl:
Iam:
Enabled: true
- Sasl:
Scram:
Enabled: true
ConfigurationInfo:
Arn: !GetAtt MSKConfiguration.Arn
Revision: 1
...

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-configuration.html

只有定义了自定义资源,才能获得最新版本。由于您对资源的全部逻辑进行了编程,因此可以执行您想要的操作,包括自动设置MKS的最新版本。

最新更新