-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
resource/ecr_repository_policy: Support import #7974
Conversation
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.
Looks great, thanks @atsushi-ishibashi! 🚀
--- PASS: TestAccAWSEcrRepositoryPolicy_basic (13.35s)
--- PASS: TestAccAWSEcrRepositoryPolicy_iam (23.50s)
@@ -78,7 +81,6 @@ func resourceAwsEcrRepositoryPolicyRead(d *schema.ResourceData, meta interface{} | |||
|
|||
log.Printf("[DEBUG] Reading repository policy %s", d.Id()) | |||
out, err := conn.GetRepositoryPolicy(&ecr.GetRepositoryPolicyInput{ | |||
RegistryId: aws.String(d.Get("registry_id").(string)), |
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.
I believe the intention here is that ECR may eventually support more than one registry per AWS account, but that is not currently supported nor does the aws_ecr_repository
resource import require the leading registry ID (e.g. AWS account ID). So this seems okay.
@@ -84,11 +96,6 @@ func testAccCheckAWSEcrRepositoryPolicyExists(name string) resource.TestCheckFun | |||
|
|||
func testAccAWSEcrRepositoryPolicy(randString string) string { | |||
return fmt.Sprintf(` | |||
# ECR initially only available in us-east-1 | |||
# https://aws.amazon.com/blogs/aws/ec2-container-registry-now-generally-available/ | |||
provider "aws" { |
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.
❤️ thanks for fixing this
This has been released in version 2.3.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 #5921
Changes proposed in this pull request:
Output from acceptance testing: