我有类似下面这样的Cloudformation模板
Resources:
WafValidHostsCondition:
Type: AWS::WAF::ByteMatchSet
Properties:
Name: !Sub ${AccountCode}-${RegionCode}-${Application}-waf-validhosts
ByteMatchTuples:
- FieldToMatch:
Type: HEADER
Data: host
TargetString: !Ref PublicDns
TextTransformation: NONE
PositionalConstraint: EXACTLY
WafValidHostsRule:
Type: AWS::WAF::Rule
Properties:
Name: !Sub ${AccountCode}-${RegionCode}-${Application}-waf-validhosts-rule
MetricName: WafValidHostsRule
Predicates:
- DataId: !Ref WafValidHostsCondition
Negated: true
Type: ByteMatch
WebAcl:
Type: AWS::WAF::WebACL
Properties:
Name: !Sub ${AccountCode}-${RegionCode}-${Application}-globalwebacl
DefaultAction:
Type: ALLOW
MetricName: GlobalWebACL
Rules:
- Action:
Type: BLOCK
Priority: 1
RuleId: !Ref WafValidHostsRule我想把它转换成地形码。是的,我可以手动完成,但有很多:)我不想使用resource aws_cloudformation_stack,因为我们正在将所有的东西从terraform迁移到terraform。我也发现了这个工具的https://github.com/humanmade/cf-to-tf,但它工作时,我有现有的CloudFormation堆栈。有没有办法通过脚本、工具或其他方式来实现呢?提前感谢
发布于 2020-12-06 22:32:51
CloudFormation to Terraform一个简单的cli工具,用于为现有的CloudFormation模板生成Terraform配置。https://github.com/humanmade/cf-to-tf
https://stackoverflow.com/questions/64048258
复制相似问题