From c38b8b9fba8641acf5f9ef21c6639bfb0e58dc9b Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Mon, 11 May 2020 15:58:56 +0200 Subject: [PATCH] new aws account --- project1/base.tf | 11 +++-- project1/terraform.tfstate | 91 +++++++++++++++++++++++++++++++++++++- 2 files changed, 96 insertions(+), 6 deletions(-) diff --git a/project1/base.tf b/project1/base.tf index 1e68d39..0185c61 100644 --- a/project1/base.tf +++ b/project1/base.tf @@ -1,9 +1,12 @@ provider "aws" { - region = "eu-west-1" + region = "eu-west-2" } -resource "aws_instance" "res1" { - ami = "ami-06ce3edf0cff21f07" +resource "aws_instance" "cedric-res1" { + ami = "ami-01a6e31ac994bbc09" instance_type = "t2.micro" - key_name = "cgd" + key_name = "cedric" + tags = { + Name = "cedric-res1" + } } diff --git a/project1/terraform.tfstate b/project1/terraform.tfstate index ed5f3ba..8d85d3c 100644 --- a/project1/terraform.tfstate +++ b/project1/terraform.tfstate @@ -1,8 +1,95 @@ { "version": 4, "terraform_version": "0.12.24", - "serial": 1, + "serial": 5, "lineage": "6efb1875-c719-ba5d-da5b-08b8b95e015f", "outputs": {}, - "resources": [] + "resources": [ + { + "mode": "managed", + "type": "aws_instance", + "name": "cedric-res1", + "provider": "provider.aws", + "instances": [ + { + "schema_version": 1, + "attributes": { + "ami": "ami-01a6e31ac994bbc09", + "arn": "arn:aws:ec2:eu-west-2:031660489033:instance/i-00a1f293278140ce2", + "associate_public_ip_address": true, + "availability_zone": "eu-west-2a", + "cpu_core_count": 1, + "cpu_threads_per_core": 1, + "credit_specification": [ + { + "cpu_credits": "standard" + } + ], + "disable_api_termination": false, + "ebs_block_device": [], + "ebs_optimized": false, + "ephemeral_block_device": [], + "get_password_data": false, + "hibernation": false, + "host_id": null, + "iam_instance_profile": "", + "id": "i-00a1f293278140ce2", + "instance_initiated_shutdown_behavior": null, + "instance_state": "running", + "instance_type": "t2.micro", + "ipv6_address_count": 0, + "ipv6_addresses": [], + "key_name": "cedric", + "metadata_options": [ + { + "http_endpoint": "enabled", + "http_put_response_hop_limit": 1, + "http_tokens": "optional" + } + ], + "monitoring": false, + "network_interface": [], + "network_interface_id": null, + "outpost_arn": "", + "password_data": "", + "placement_group": "", + "primary_network_interface_id": "eni-0b8e2d7647abe7303", + "private_dns": "ip-172-31-23-169.eu-west-2.compute.internal", + "private_ip": "172.31.23.169", + "public_dns": "ec2-35-178-31-219.eu-west-2.compute.amazonaws.com", + "public_ip": "35.178.31.219", + "root_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/xvda", + "encrypted": false, + "iops": 100, + "kms_key_id": "", + "volume_id": "vol-01ff18f2ae61a6377", + "volume_size": 8, + "volume_type": "gp2" + } + ], + "security_groups": [ + "default" + ], + "source_dest_check": true, + "subnet_id": "subnet-d9ae3aa3", + "tags": { + "Name": "cedric-res1" + }, + "tenancy": "default", + "timeouts": null, + "user_data": null, + "user_data_base64": null, + "volume_tags": {}, + "vpc_security_group_ids": [ + "sg-64368d06" + ] + }, + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + } + ] }