amazon-web-services - 在 CloudFormation 中获取 AWS::MSK::Configuration 的最新版本

标签 amazon-web-services aws-cloudformation aws-msk

我正在尝试使用 MSK 配置创建 cloudFormation 堆栈,并将 MSK 配置与 MSK 集群关联。创建 AWS::MSK::Configuration 仅返回 ARN,而我需要 ARN 和修订号才能将 MSK 配置关联到 MSK 集群。有什么办法可以实现这一点吗?目前我将其硬编码为 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

最佳答案

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

关于amazon-web-services - 在 CloudFormation 中获取 AWS::MSK::Configuration 的最新版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73909810/

相关文章:

amazon-web-services - 如何为 boto3.s3.transfer.TransferConfig 添加加密以进行 s3 文件上传

amazon-web-services - 在 Terraform 中将 "Application Load Balancer"附加到 "Auto Scaling Group"会出现错误

amazon-web-services - 在哪里可以找到 AWS CloudFormation API 的 SLA

amazon-web-services - 让两个管道进行通信以在 Beanstalk dev-env 上部署,然后在 prod-env 上发布之前使用 NewMan 运行集成测试

windows - 为什么 cfn-init 会回复这个奇怪的消息?

amazon-web-services - 使用 NLB 和 IAM 身份验证公开 AWS MSK - 主机名验证失败

python - 如何使用 boto3 删除 aws elasticache redis 类型的集群?

apache-kafka-connect - 有没有办法使用 MSK-connect API 更新连接器配置?

amazon-web-services - 适用于Kafka的Amazon Managed Streaming-MSK功能和性能

amazon-web-services - AWS Batch 作业 - 设备上没有剩余空间,但已启用 EBS 自动扩展