To be honest, I have my doubts about this PR.
There’s no way to delete the configuration. There’s only PutAccountSetting and GetAccountSetting. It’s also possible to assign a name, but if I understand correctly, it can only have the value BASIC_SCAN_TYPE_VERSION. That’s why the test is a bit vague. I’ll set the PR to draft mode to potentially get input from others.
$ make testacc TESTS=TestAccECRAccountSetting_serial PKG=ecr
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccAccountSetting_serial' -timeout 360m
2024/11/20 21:44:35 Initializing Terraform AWS Provider...
=== RUN TestAccAccountSetting_serial
=== PAUSE TestAccAccountSetting_serial
=== CONT TestAccAccountSetting_serial
=== RUN TestAccAccountSetting_serial/basic
--- PASS: TestAccAccountSetting_serial (30.28s)
--- PASS: TestAccAccountSetting_serial/basic (30.28s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ecr 45.900s
...
Examples using local provider:
resource "aws_ecr_account_setting" "test" {
name = "BASIC_SCAN_TYPE_VERSION"
value = "AWS_NATIVE"
}
Apply:
# aws_ecr_account_setting.test will be created
+ resource "aws_ecr_account_setting" "test" {
+ id = (known after apply)
+ name = "BASIC_SCAN_TYPE_VERSION"
+ value = "AWS_NATIVE"
}
Terraform will perform the following actions:
# aws_ecr_account_setting.test will be updated in-place
~ resource "aws_ecr_account_setting" "test" {
id = "BASIC_SCAN_TYPE_VERSION"
name = "BASIC_SCAN_TYPE_VERSION"
~ value = "AWS_NATIVE" -> "CLAIR"
}
Plan: 0 to add, 1 to change, 0 to destroy.
Terraform will perform the following actions:
# aws_ecr_account_setting.test will be destroyed
- resource "aws_ecr_account_setting" "test" {
- id = "BASIC_SCAN_TYPE_VERSION" -> null
- name = "BASIC_SCAN_TYPE_VERSION" -> null
- value = "CLAIR" -> null
}
Plan: 0 to add, 0 to change, 1 to destroy.
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.
For Submitters
Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.
Description
To be honest, I have my doubts about this PR. There’s no way to delete the configuration. There’s only
PutAccountSetting
andGetAccountSetting
. It’s also possible to assign a name, but if I understand correctly, it can only have the valueBASIC_SCAN_TYPE_VERSION
. That’s why the test is a bit vague. I’ll set the PR to draft mode to potentially get input from others.Relations
Closes #40140
References
Output from Acceptance Testing
Examples using local provider:
Apply:
Check w CLI
Switch to `CLAIR``
CLI output
Destroy
Check CLI. Setting remains on last value