jinleileiking / learning-notes

Notes for my learning.
GNU General Public License v3.0
1 stars 2 forks source link

Terraform #7

Open jinleileiking opened 1 year ago

jinleileiking commented 1 year ago

取得sshkey

terraform show -json | \
jq -r '.values.root_module.resources[].values | select(.private_key_pem) |.private_key_pem'

aliyun dns 无权限

需要在用户那加上dns的权限

cloudfront 报alias错

https://aws.amazon.com/cn/premiumsupport/knowledge-center/resolve-cnamealreadyexists-error/

就是,aws会验证alias的dns,需要从阿里把这个dns删掉

cloudwatch alarm

eks添加子网

开发中,遇到1a没有机器了,所以要多加一个子网

忽略某些tf文件

结论:目前不可行,workaround:

  1. https://github.com/hashicorp/terraform/issues/27360 lifecycle目前不能给module进行ignore
  2. -exclude目前也没实现只能搞一堆-target