diff --git a/Cloud_Intro/IAM_240112_181504.pdf b/Cloud_Intro/IAM_240112_181504.pdf new file mode 100644 index 0000000..79e9e50 Binary files /dev/null and b/Cloud_Intro/IAM_240112_181504.pdf differ diff --git a/Docker/docker.docx b/Docker/docker.docx new file mode 100644 index 0000000..0c24b86 Binary files /dev/null and b/Docker/docker.docx differ diff --git a/Terraform/Change infrastructure b/Terraform/Change infrastructure new file mode 100644 index 0000000..9251965 --- /dev/null +++ b/Terraform/Change infrastructure @@ -0,0 +1,34 @@ +Change infrastructure + +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 4.16" + } + } + + required_version = ">= 1.2.0" +} + +provider "aws" { + region = "us-west-2" +} + +resource "aws_instance" "app_server" { + ami = "ami-830c94e3" + instance_type = "t2.micro" + + tags = { + Name = "ExampleAppServerInstance" + } +} + + +Initialize the configuration +terraform init + +Apply the configuration. Respond to the confirmation prompt with a yes +terraform apply + + diff --git a/Terraform/Destroy infrastructure b/Terraform/Destroy infrastructure new file mode 100644 index 0000000..9bfa1ab --- /dev/null +++ b/Terraform/Destroy infrastructure @@ -0,0 +1,36 @@ +terraform destroy + +Terraform used the selected providers to generate the following execution plan. +Resource actions are indicated with the following symbols: + - destroy + +Terraform will perform the following actions: + + # aws_instance.app_server will be destroyed + - resource "aws_instance" "app_server" { + - ami = "ami-08d70e59c07c61a3a" -> null + - arn = "arn:aws:ec2:us-west-2:561656980159:instance/i-0fd4a35969bd21710" -> null +##... + +Plan: 0 to add, 0 to change, 1 to destroy. + +Do you really want to destroy all resources? + Terraform will destroy all your managed infrastructure, as shown above. + There is no undo. Only 'yes' will be accepted to confirm. + + Enter a value: + +The - prefix indicates that the instance will be destroyed. As with apply, Terraform shows its execution plan and waits for approval before making any changes. + +Answer yes to execute this plan and destroy the infrastructure. + + Enter a value: yes + +aws_instance.app_server: Destroying... [id=i-0fd4a35969bd21710] +aws_instance.app_server: Still destroying... [id=i-0fd4a35969bd21710, 10s elapsed] +aws_instance.app_server: Still destroying... [id=i-0fd4a35969bd21710, 20s elapsed] +aws_instance.app_server: Still destroying... [id=i-0fd4a35969bd21710, 30s elapsed] +aws_instance.app_server: Destruction complete after 31s +Destroy complete! Resources: 1 destroyed. + +Just like with apply, Terraform determines the order to destroy your resources. In this case, Terraform identified a single instance with no other dependencies, so it destroyed the instance. In more complicated cases with multiple resources, Terraform will destroy them in a suitable order to respect dependencies.