0
Terraformを使用してAWS EC2インスタンスを作成しようとしています。状態を保存できませんでした:open terraform.tfstate:アクセス権が拒否されました
$ terraform apply
私は、上記のコマンドを実行した後、次の出力を得ました。
aws_instance.example: Creating...
ami: "" => "ami-2d39803a"
associate_public_ip_address: "" => "<computed>"
availability_zone: "" => "<computed>"
ebs_block_device.#: "" => "<computed>"
ephemeral_block_device.#: "" => "<computed>"
instance_state: "" => "<computed>"
instance_type: "" => "t2.micro"
key_name: "" => "<computed>"
network_interface_id: "" => "<computed>"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "true"
subnet_id: "" => "<computed>"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "<computed>"
aws_instance.example: Still creating... (10s elapsed)
aws_instance.example: Still creating... (20s elapsed)
aws_instance.example: Still creating... (30s elapsed)
aws_instance.example: Creation complete
Failed to save state: open terraform.tfstate: permission denied
が、EC2インスタンスが作成されますが、あなたはコンソール出力の最後の行に注意することができますように私のインフラストラクチャの状態が保存されません。