Skip to content

Commit

Permalink
add properties to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ulich committed Feb 13, 2018
1 parent b8bab6b commit 9361f08
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,38 @@ terraform import aws_elastic_beanstalk_environment.my_ebs_staging e-pcpeep3b3z
```

Terraform now imported the resources into it's state.


## 4.

Now we need to add the properties to the terraform resource descriptions:

```
git checkout step-4
```

The terraform resource descriptions cannot be generated automatically
when importing a resource as of this writing. Instead it must be written manually.

You can now run
```
terraform plan
```

Ideally terraform says that there are no changes required, because the resource
description in the terraform script is the same as the imported resource.

If it does not, you can continue updating the terraform script until `terraform plan`
says that the infrastructure is up to date.

This is the result when running `terraform plan` in this example:

```
~ aws_elastic_beanstalk_environment.my_ebs_staging
wait_for_ready_timeout: "" => "20m"
```

Terraform only wants to update `wait_for_ready_timeout` to 20 minutes since
terraform has a default value of 20 minutes set, even if you do not specify
the value. This plan is safe to be applied, it won't do anything harmful.

4 changes: 4 additions & 0 deletions terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ provider "aws" {
}

resource "aws_elastic_beanstalk_application" "my_ebs" {
name = "coffee-service"
}

resource "aws_elastic_beanstalk_environment" "my_ebs_staging" {
application = "coffee-service"
name = "staging"
solution_stack_name = "64bit Amazon Linux 2017.09 v2.6.5 running Java 8"
}

0 comments on commit 9361f08

Please sign in to comment.