-
Notifications
You must be signed in to change notification settings - Fork 772
cloudflare_account_member v0 migration #6544
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
base: next
Are you sure you want to change the base?
cloudflare_account_member v0 migration #6544
Conversation
d9e9bf4 to
120b53d
Compare
|
PR looks good -- I see that there's one failing test when I run the full suite for this resource. I don't think it's related to your patch. mgirouard@sixteen:~/src/terraform-devstack/cloudflare-terraform-next$ TF_MIGRATE_BINARY_PATH=/home/mgirouard/src/terraform-devstack/tf-migrate/tf-migrate TF_ACC=1 go test ./internal/services/account_member -v -count=1
=== RUN TestAccountMemberDataSourceModelSchemaParity
=== PAUSE TestAccountMemberDataSourceModelSchemaParity
=== RUN TestAccountMembersDataSourceModelSchemaParity
=== PAUSE TestAccountMembersDataSourceModelSchemaParity
=== RUN TestMigrateCloudflareAccountMember_Migration_Basic_MultiVersion
=== RUN TestMigrateCloudflareAccountMember_Migration_Basic_MultiVersion/from_v4_52_1
--- PASS: TestMigrateCloudflareAccountMember_Migration_Basic_MultiVersion (19.91s)
--- PASS: TestMigrateCloudflareAccountMember_Migration_Basic_MultiVersion/from_v4_52_1 (19.91s)
=== RUN TestMigrateCloudflareAccountMember_Migration_WithStatus
migrations_test.go:132: Step 1/3 error: Error running apply: exit status 1
Error: error creating Cloudflare account member: Cannot add verified membership for non-existing user (1003)
with cloudflare_account_member.cftftestvtmfjhnkqd,
on terraform_plugin_test.tf line 14, in resource "cloudflare_account_member" "cftftestvtmfjhnkqd":
14: resource "cloudflare_account_member" "cftftestvtmfjhnkqd" {
--- FAIL: TestMigrateCloudflareAccountMember_Migration_WithStatus (5.01s)
=== RUN TestMigrateAccountMemberFromV5_13
--- PASS: TestMigrateAccountMemberFromV5_13 (23.90s)
=== RUN TestAccountMemberModelSchemaParity
=== PAUSE TestAccountMemberModelSchemaParity
=== RUN TestAccCloudflareAccountMember_Basic
--- PASS: TestAccCloudflareAccountMember_Basic (8.62s)
=== RUN TestAccCloudflareAccountMember_Import
--- PASS: TestAccCloudflareAccountMember_Import (11.97s)
=== RUN TestAccCloudflareAccountMember_DirectAdd
resource_test.go:182: API now throws if the user doesn't exist. We will have to see if we can easily create test users for this test.
--- SKIP: TestAccCloudflareAccountMember_DirectAdd (0.00s)
=== RUN TestAccCloudflareAccountMember_RolesUpdate
--- PASS: TestAccCloudflareAccountMember_RolesUpdate (9.04s)
=== RUN TestAccCloudflareAccountMember_RolesVsPolicies
--- PASS: TestAccCloudflareAccountMember_RolesVsPolicies (4.87s)
=== RUN TestAccCloudflareAccountMember_Policies
--- PASS: TestAccCloudflareAccountMember_Policies (11.47s)
=== RUN TestAccCloudflareAccountMember_PoliciesAddResourceGroup
resource_test.go:384: Needs a DSR enabled user
--- SKIP: TestAccCloudflareAccountMember_PoliciesAddResourceGroup (0.00s)
=== CONT TestAccountMemberDataSourceModelSchemaParity
=== CONT TestAccountMemberModelSchemaParity
=== CONT TestAccountMembersDataSourceModelSchemaParity
--- PASS: TestAccountMemberModelSchemaParity (0.00s)
--- PASS: TestAccountMemberDataSourceModelSchemaParity (0.00s)
--- PASS: TestAccountMembersDataSourceModelSchemaParity (0.00s)
FAIL
FAIL github.com/cloudflare/terraform-provider-cloudflare/internal/services/account_member 94.833s
FAIL |
I'll take a look at this for the next release. So holding till then |
|
I spoke to @vaishakdinesh about this earlier. I don't actually know how that test was ever passing because you can't direct invite (set status = "accepted") a non-existing user and the test is creating a random user. |
Changes being requested
Adding StateUpgrader for recent 5.13.0 -> 5.14.0 changes. Policy IDs were removed from policies as well as having some lists changed to sets, and while there were no problems handling 5.13.0 state in terraform plan/apply, running a
terraform showcommand would crash on unknown policy "id" attribute.