-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
New Resource: aws_imagebuilder_image_pipeline #16299
Conversation
# Conflicts: # aws/provider.go
# Conflicts: # aws/provider.go
# Conflicts: # aws/provider.go
…ing set on create
fixed lint issues and terminate_instance_on_failure
…vider-aws into Dogers-image-builder
Reference: #11084 Reference: #13485 Reference: #16218 (required for `aws_imagebuilder_image_recipe` resource implementation) Changes: ``` * **New Data Source:** `aws_imagebuilder_image_pipeline` * **New Resource:** `aws_imagebuilder_image_pipeline` ``` Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAwsImageBuilderImagePipeline_basic (36.73s) --- PASS: TestAccAwsImageBuilderImagePipeline_Description (59.17s) --- PASS: TestAccAwsImageBuilderImagePipeline_disappears (28.69s) --- PASS: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (62.02s) --- PASS: TestAccAwsImageBuilderImagePipeline_EnhancedImageMetadataEnabled (61.63s) --- PASS: TestAccAwsImageBuilderImagePipeline_ImageRecipeArn (57.56s) --- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_ImageTestsEnabled (61.52s) --- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_TimeoutMinutes (61.49s) --- PASS: TestAccAwsImageBuilderImagePipeline_InfrastructureConfigurationArn (57.93s) --- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (61.29s) --- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (62.21s) --- PASS: TestAccAwsImageBuilderImagePipeline_Status (57.90s) --- PASS: TestAccAwsImageBuilderImagePipeline_Tags (73.01s) --- PASS: TestAccAwsImageBuilderImagePipelineDataSource_Arn (33.95s) ``` Output from acceptance testing in AWS GovCloud (US): ``` --- PASS: TestAccAwsImageBuilderImagePipeline_basic (45.88s) --- PASS: TestAccAwsImageBuilderImagePipeline_Description (65.03s) --- PASS: TestAccAwsImageBuilderImagePipeline_disappears (39.74s) --- PASS: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (66.42s) --- PASS: TestAccAwsImageBuilderImagePipeline_EnhancedImageMetadataEnabled (63.39s) --- PASS: TestAccAwsImageBuilderImagePipeline_ImageRecipeArn (66.54s) --- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_ImageTestsEnabled (65.08s) --- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_TimeoutMinutes (61.28s) --- PASS: TestAccAwsImageBuilderImagePipeline_InfrastructureConfigurationArn (66.96s) --- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (61.44s) --- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (60.45s) --- PASS: TestAccAwsImageBuilderImagePipeline_Status (65.08s) --- PASS: TestAccAwsImageBuilderImagePipeline_Tags (81.64s) --- PASS: TestAccAwsImageBuilderImagePipelineDataSource_Arn (36.13s) ``` Output from sweeper in AWS Commercial: ``` 2020/11/18 20:23:09 [DEBUG] Running Sweepers for region (us-west-2): 2020/11/18 20:23:09 [DEBUG] Running Sweeper (aws_imagebuilder_image_pipeline) in region (us-west-2) 2020/11/18 20:23:11 Sweeper Tests ran successfully: - aws_imagebuilder_image_pipeline 2020/11/18 20:23:11 [DEBUG] Running Sweepers for region (us-east-1): 2020/11/18 20:23:11 [DEBUG] Running Sweeper (aws_imagebuilder_image_pipeline) in region (us-east-1) 2020/11/18 20:23:11 Sweeper Tests ran successfully: - aws_imagebuilder_image_pipeline ok github.com/terraform-providers/terraform-provider-aws/aws 5.138s ``` Output from sweeper in AWS GovCloud (US): ``` 2020/11/18 20:23:10 [DEBUG] Running Sweepers for region (us-gov-west-1): 2020/11/18 20:23:10 [DEBUG] Running Sweeper (aws_imagebuilder_image_pipeline) in region (us-gov-west-1) 2020/11/18 20:23:13 Sweeper Tests ran successfully: - aws_imagebuilder_image_pipeline ok github.com/terraform-providers/terraform-provider-aws/aws 4.805s ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
One suggestion and one question
--- PASS: TestAccAwsImageBuilderImagePipelineDataSource_Arn (47.87s)
--- PASS: TestAccAwsImageBuilderImagePipeline_basic (51.01s)
--- PASS: TestAccAwsImageBuilderImagePipeline_disappears (58.33s)
--- PASS: TestAccAwsImageBuilderImagePipeline_InfrastructureConfigurationArn (81.36s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageRecipeArn (81.42s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_ImageTestsEnabled (81.54s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Status (83.55s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Description (84.27s)
--- PASS: TestAccAwsImageBuilderImagePipeline_EnhancedImageMetadataEnabled (84.90s)
--- PASS: TestAccAwsImageBuilderImagePipeline_ImageTestsConfiguration_TimeoutMinutes (84.85s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_ScheduleExpression (85.05s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Schedule_PipelineExecutionStartCondition (85.34s)
--- PASS: TestAccAwsImageBuilderImagePipeline_DistributionConfigurationArn (85.46s)
--- PASS: TestAccAwsImageBuilderImagePipeline_Tags (96.18s)
"infrastructure_configuration_arn": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^arn:aws[^:]*:imagebuilder:[^:]+:(?:\d{12}|aws):infrastructure-configuration/[a-z0-9-_]+$`), "valid infrastructure configuration ARN must be provided"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a case for a set of functions like ValidateRegionalARN(arnServicestring, arnResourceRegexp *regexp.Regexp)
analogous to the testAccMatchResourceAttr...ARN()
functions.
So we'd have something like
ValidateFunc: ValidateRegionalARN("imagebuilder", regexp.MustCompile(`infrastructure-configuration/[a-z0-9-_]+$`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #16434 and will add to technical research board.
return nil | ||
} | ||
|
||
func testAccCheckAwsImageBuilderImagePipelineExists(resourceName string) resource.TestCheckFunc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the image pipeline be returned using from the exists function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #16435 and added to technical research board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To provide more color here, I think we can move away from those "CheckExists" functions altogether since import testing accomplishes the same thing, rather than worrying about creating those or making them consistent.
This has been released in version 3.18.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! |
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! |
Community Note
Closes #11084
Closes #13485
Reference: #16218 (required for
aws_imagebuilder_image_recipe
resource implementation)Release note for CHANGELOG:
Output from acceptance testing in AWS Commercial:
Output from acceptance testing in AWS GovCloud (US):
Output from sweeper in AWS Commercial:
Output from sweeper in AWS GovCloud (US):