#前提・実現したいこと
Terraformを使用してAWSのALBを作成しようとしているのですが、Access Deniedエラーにより作成ができません。
他のリソース(EC2、S3など)については作成が出来ています。
試しにTerraform実行ユーザに対してAdministratorAccessポリシーをアタッチしてみたのですが、それでも同様のエラーにより作成ができませんでした。
何が原因であるかご存知の方がいらっしゃいましたらご教授いただけると幸いです。
#エラーメッセージ
aws_alb.main: Error creating Application Load Balancer: AccessDenied: User: arn:aws:iam::xxxxxxxxxx:user/terraform is not authorized to perform: ec2:DescribeAccountAttributes
#ソースコード
alb.tf
1module "alb" { 2 source = "../modules/terraform-aws-alb-master" 3 alb_name = "${terraform.workspace}-alb" 4 5 alb_protocols = ["HTTPS"] 6 7 alb_security_groups = [ 8 "${module.vpc.default_security_group_id}", 9 "${module.security_group_https.this_security_group_id}", 10 ] 11 12 certificate_arn = "${data.aws_acm_certificate.this.arn}" 13 subnets = "${module.vpc.public_subnets}" 14 vpc_id = "${module.vpc.vpc_id}" 15 16 backend_protocol = "${lookup(var.alb, "${terraform.workspace}.backend_protocol")}" 17 health_check_path = "/favicon.ico" 18 health_check_port = "${lookup(var.alb, "${terraform.workspace}.health_check_port")}" 19 health_check_timeout = "${lookup(var.alb, "${terraform.workspace}.health_check_timeout")}" 20 health_check_interval = "${lookup(var.alb, "${terraform.workspace}.health_check_interval")}" 21 health_check_healthy_threshold = "${lookup(var.alb, "${terraform.workspace}.health_check_healthy_threshold")}" 22 health_check_unhealthy_threshold = "${lookup(var.alb, "${terraform.workspace}.health_check_unhealthy_threshold")}" 23 health_check_matcher = "${lookup(var.alb, "${terraform.workspace}.health_check_matcher")}" 24 25 deregistration_delay = "${lookup(var.alb, "${terraform.workspace}.deregistration_delay")}" 26 27 cookie_duration = 86400 28 29 log_bucket_name = "${terraform.workspace}-alb-logs" 30 log_location_prefix = "${terraform.workspace}-alb" 31 enable_logging = true 32 force_destroy_log_bucket = false 33 create_log_bucket = true 34 35 tags { 36 Terraform = "true" 37 Environment = "${terraform.workspace}" 38 } 39} 40
#補足情報(FW/ツールのバージョンなど)
- Terraform v0.11.7
- provider.archive v1.1.0
- provider.aws v1.30.0
- provider.null v1.0.0
- provider.random v1.3.1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。