Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: EC2 Image Builder Distribution Configuration #13316

Closed
breathingdust opened this issue May 14, 2020 · 6 comments · Fixed by #16180
Closed

Feature Request: EC2 Image Builder Distribution Configuration #13316

breathingdust opened this issue May 14, 2020 · 6 comments · Fixed by #16180
Assignees
Labels
new-resource Introduces a new resource. service/imagebuilder Issues and PRs that pertain to the imagebuilder service.
Milestone

Comments

@breathingdust
Copy link
Member

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

In December 2019 AWS announced the availability of EC2 ImageBuilder, a service that makes it easier and faster to build and maintain secure images. Image Builder simplifies the creation, patching, testing, distribution, and sharing of Linux or Windows Server images.

New Resource

  • aws_imagebuilder_distribution_configuration

Potential Terraform Configuration

resource "aws_imagebuilder_distribution_configuration" "example" {
  arn                = ""  
  client_token       = ""
  description        = ""
  distribution {           
    ami_distribution_configuration {
      ami_tags         = {}
      description      = ""
      launch_permission {
        user_groups      = []
        user_ids         = []
      }
      name             = ""
    }
    license_configuration_arns = []
    region                     = ""
  }
  name               = ""
  tags               = {}
  timeout_minutes    = 0 
}

References

Announcement: https://aws.amazon.com/about-aws/whats-new/2019/12/introducing-ec2-image-builder/
API Reference: https://docs.aws.amazon.com/imagebuilder/latest/APIReference/Welcome.html
SDK Reference: https://docs.aws.amazon.com/sdk-for-go/api/service/imagebuilder/

@breathingdust breathingdust added new-resource Introduces a new resource. help wanted labels May 14, 2020
@ghost ghost added the service/imagebuilder Issues and PRs that pertain to the imagebuilder service. label May 14, 2020
@iancward
Copy link
Contributor

Is this a dupe of #11084? That one appears to encompass the full service.

@breathingdust
Copy link
Member Author

Hi @iancward, it's not a dupe I'm just breaking it out into separate resources. It's easier for us to track that way, and easier for contributors to pick up a single resource. 👍

@iancward
Copy link
Contributor

iancward commented Jun 9, 2020

Might be resolved by #13485

@bflad bflad self-assigned this Oct 13, 2020
bflad added a commit that referenced this issue Nov 13, 2020
Reference: #11084
Reference: #13316
Reference: #13485

Changes:

```
* **New Data Source:** `aws_imagebuilder_distribution_configuration`
* **New Resource:** `aws_imagebuilder_distribution_configuration`
```

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_basic (23.95s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Description (39.52s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_disappears (18.57s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution (42.99s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_AmiTags (40.02s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Description (39.36s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_KmsKeyId (46.31s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserGroups (23.66s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserIds (40.12s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Name (39.12s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_TargetAccountIds (40.12s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (40.75s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Tags (49.75s)

--- PASS: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (18.52s)
```

Output from acceptance testing in AWS GovCloud (US) (failure information: #16178):

```
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (10.88s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_basic (27.00s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Description (40.22s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_disappears (21.76s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_AmiTags (42.09s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Description (42.89s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_KmsKeyId (51.80s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserGroups (26.70s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserIds (41.44s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Name (42.32s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_TargetAccountIds (42.42s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Tags (55.37s)

--- PASS: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (25.62s)
```

Output from sweeper in AWS Commercial:

```
2020/11/13 09:11:34 [DEBUG] Running Sweepers for region (us-west-2):
2020/11/13 09:11:34 [DEBUG] Running Sweeper (aws_imagebuilder_distribution_configuration) in region (us-west-2)
2020/11/13 09:11:37 Sweeper Tests ran successfully:
  - aws_imagebuilder_distribution_configuration
2020/11/13 09:11:37 [DEBUG] Running Sweepers for region (us-east-1):
2020/11/13 09:11:37 [DEBUG] Running Sweeper (aws_imagebuilder_distribution_configuration) in region (us-east-1)
2020/11/13 09:11:39 Sweeper Tests ran successfully:
  - aws_imagebuilder_distribution_configuration
ok    github.com/terraform-providers/terraform-provider-aws/aws 7.724s
```
Output from sweeper in AWS GovCloud (US):

```
2020/11/13 09:30:11 [DEBUG] Running Sweepers for region (us-gov-west-1):
2020/11/13 09:30:11 [DEBUG] Running Sweeper (aws_imagebuilder_distribution_configuration) in region (us-gov-west-1)
2020/11/13 09:30:14 Sweeper Tests ran successfully:
  - aws_imagebuilder_distribution_configuration
ok    github.com/terraform-providers/terraform-provider-aws/aws 4.971s
```
@bflad bflad added this to the v3.16.0 milestone Nov 13, 2020
bflad added a commit that referenced this issue Nov 17, 2020
* Add aws_imagebuilder_component

* Add test for data_source_aws_imagebuilder_component

* Add aws_imagebuilder_infrastructureconfiguration

* Add aws_imagebuilder_recipe

* Rename to aws_imagebuilder_infrastructure_configuration

* Fix issue with infraconfig logging

* Fix incorrect MaxItems on res

* Fix S024

* Fix AWSR002

* Fix linting

* [#11084] Fix the imagebuilder resource, add test and docs

# Conflicts:
#	aws/provider.go

* Fix incorrect import on error handling

* Update to v2 SDK

* Fix R004 lint issue

* Remove changes to aws.erb

* Add imagebuilder_distribution_configuration

* Add imagebuilder_image_pipeline

* fixed some lint issues and fixed terminate_instance_on_failure not being set on create

* description can be updated in place

* service/imagebuilder: Remove non-aws_imagebuilder_distribution_configuration files

* New Resource: aws_imagebuilder_distribution_configuration

Reference: #11084
Reference: #13316
Reference: #13485

Changes:

```
* **New Data Source:** `aws_imagebuilder_distribution_configuration`
* **New Resource:** `aws_imagebuilder_distribution_configuration`
```

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_basic (23.95s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Description (39.52s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_disappears (18.57s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution (42.99s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_AmiTags (40.02s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Description (39.36s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_KmsKeyId (46.31s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserGroups (23.66s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserIds (40.12s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Name (39.12s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_TargetAccountIds (40.12s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (40.75s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Tags (49.75s)

--- PASS: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (18.52s)
```

Output from acceptance testing in AWS GovCloud (US) (failure information: #16178):

```
--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (10.88s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_basic (27.00s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Description (40.22s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_disappears (21.76s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_AmiTags (42.09s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Description (42.89s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_KmsKeyId (51.80s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserGroups (26.70s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_LaunchPermission_UserIds (41.44s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_Name (42.32s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Distribution_AmiDistributionConfiguration_TargetAccountIds (42.42s)
--- PASS: TestAccAwsImageBuilderDistributionConfiguration_Tags (55.37s)

--- PASS: TestAccAwsImageBuilderDistributionConfigurationDataSource_Arn (25.62s)
```

Output from sweeper in AWS Commercial:

```
2020/11/13 09:11:34 [DEBUG] Running Sweepers for region (us-west-2):
2020/11/13 09:11:34 [DEBUG] Running Sweeper (aws_imagebuilder_distribution_configuration) in region (us-west-2)
2020/11/13 09:11:37 Sweeper Tests ran successfully:
  - aws_imagebuilder_distribution_configuration
2020/11/13 09:11:37 [DEBUG] Running Sweepers for region (us-east-1):
2020/11/13 09:11:37 [DEBUG] Running Sweeper (aws_imagebuilder_distribution_configuration) in region (us-east-1)
2020/11/13 09:11:39 Sweeper Tests ran successfully:
  - aws_imagebuilder_distribution_configuration
ok    github.com/terraform-providers/terraform-provider-aws/aws 7.724s
```
Output from sweeper in AWS GovCloud (US):

```
2020/11/13 09:30:11 [DEBUG] Running Sweepers for region (us-gov-west-1):
2020/11/13 09:30:11 [DEBUG] Running Sweeper (aws_imagebuilder_distribution_configuration) in region (us-gov-west-1)
2020/11/13 09:30:14 Sweeper Tests ran successfully:
  - aws_imagebuilder_distribution_configuration
ok    github.com/terraform-providers/terraform-provider-aws/aws 4.971s
```

* docs/resource/aws_imagebuilder_distribution_configuration: Fix typo

Co-authored-by: Dogers <[email protected]>
Co-authored-by: Jakub Kania <[email protected]>
Co-authored-by: Bill Schneider <[email protected]>
@bflad
Copy link
Contributor

bflad commented Nov 17, 2020

A new aws_imagebuilder_distribution_configuration resource has been merged and will release with version 3.16.0 of the Terraform AWS Provider, later this week. Thank you to @Dogers for the initial implementation. 👍

@ghost
Copy link

ghost commented Nov 18, 2020

This has been released in version 3.16.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Dec 18, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/imagebuilder Issues and PRs that pertain to the imagebuilder service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants