Skip to content

Commit 1fcff25

Browse files
coderGo93Edgar Lopez
andauthored
INTMDB-183: Migrate to TF SDK 2 (#489)
* initial migrate sdk v2 * refactor: deleted maxitems for datasource because it's bad practice for make test * refactor: changed typemap to typelist for datasource and resources because it's bad practice for make test and not supported in sdk v2 * refactor: changed Provider to ProviderFactories in tests * updated name of funcs for sdk v2 * refactor: changed Provider to ProviderFactories in tests * refactor: get the old fields of typemap because of possibly of future issues related to state * docs: updated upgrade guide for migration * fixes bug * fixes linter * fixes linter * fixes linter * fixes bug for restore job * fixes bug * refactor: changed create without timeout to normal * refactor: changed to context without timeout for cluster resource since it can take a while usually depending of the case * fix: fixes some testacc * fixes linter * docs: updated changes suggested by melissa * refactor: made changes suggested by tony * migrated event triggers * fix: random error related to client * fixes import for search Co-authored-by: Edgar Lopez <[email protected]>
1 parent 0008dcd commit 1fcff25

File tree

173 files changed

+3830
-2569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+3830
-2569
lines changed

.github/workflows/automated-test-acceptances.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Set up Go
3535
uses: actions/setup-go@v2
3636
with:
37-
go-version: 1.14
37+
go-version: 1.16
3838
- name: Acceptance Tests
3939
env:
4040
SKIP_TEST_EXTERNAL_CREDENTIALS: ${{ secrets.SKIP_TEST_EXTERNAL_CREDENTIALS }}

.github/workflows/automated-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Set up Go
1212
uses: actions/setup-go@v2
1313
with:
14-
go-version: 1.14
14+
go-version: 1.16
1515
- name: Code Lint
1616
run: make tools && make lint
1717
- name: Website

examples/atlas-cloud-provider-access/aws/aws-roles.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ resource "aws_iam_role" "test_role" {
2626
{
2727
"Effect": "Allow",
2828
"Principal": {
29-
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.atlas_aws_account_arn}"
29+
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.0.atlas_aws_account_arn}"
3030
},
3131
"Action": "sts:AssumeRole",
3232
"Condition": {
3333
"StringEquals": {
34-
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.atlas_assumed_role_external_id}"
34+
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.0.atlas_assumed_role_external_id}"
3535
}
3636
}
3737
}

examples/atlas-cloud-provider-access/aws/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ resource "mongodbatlas_cloud_provider_access_authorization" "auth_role" {
77
project_id = var.project_id
88
role_id = mongodbatlas_cloud_provider_access_setup.setup_only.role_id
99

10-
aws = {
10+
aws {
1111
iam_assumed_role_arn = aws_iam_role.test_role.arn
1212
}
1313
}

examples/atlas-dataLake-roles/aws-roles.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ resource "aws_iam_role" "test_role" {
2626
{
2727
"Effect": "Allow",
2828
"Principal": {
29-
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.atlas_aws_account_arn}"
29+
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.0.atlas_aws_account_arn}"
3030
},
3131
"Action": "sts:AssumeRole",
3232
"Condition": {
3333
"StringEquals": {
34-
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.atlas_assumed_role_external_id}"
34+
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.0.atlas_assumed_role_external_id}"
3535
}
3636
}
3737
}

examples/atlas-dataLake-roles/import/aws-roles.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ resource "aws_iam_role" "test_role" {
2626
{
2727
"Effect": "Allow",
2828
"Principal": {
29-
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.atlas_aws_account_arn}"
29+
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.0.atlas_aws_account_arn}"
3030
},
3131
"Action": "sts:AssumeRole",
3232
"Condition": {
3333
"StringEquals": {
34-
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.atlas_assumed_role_external_id}"
34+
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.0.atlas_assumed_role_external_id}"
3535
}
3636
}
3737
}

examples/atlas-dataLake-roles/import/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resource "mongodbatlas_cloud_provider_access_authorization" "auth_role" {
1313
project_id = mongodbatlas_project.test.id
1414
role_id = mongodbatlas_cloud_provider_access_setup.setup_only.role_id
1515

16-
aws = {
16+
aws {
1717
iam_assumed_role_arn = aws_iam_role.test_role.arn
1818
}
1919
}

examples/atlas-dataLake-roles/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resource "mongodbatlas_cloud_provider_access_authorization" "auth_role" {
1313
project_id = mongodbatlas_project.test.id
1414
role_id = mongodbatlas_cloud_provider_access_setup.setup_only.role_id
1515

16-
aws = {
16+
aws {
1717
iam_assumed_role_arn = aws_iam_role.test_role.arn
1818
}
1919
}

examples/atlas-encryption-at-rest/aws/aws-roles.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ resource "aws_iam_role" "test_role" {
2626
{
2727
"Effect": "Allow",
2828
"Principal": {
29-
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.atlas_aws_account_arn}"
29+
"AWS": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.0.atlas_aws_account_arn}"
3030
},
3131
"Action": "sts:AssumeRole",
3232
"Condition": {
3333
"StringEquals": {
34-
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.atlas_assumed_role_external_id}"
34+
"sts:ExternalId": "${mongodbatlas_cloud_provider_access_setup.setup_only.aws.0.atlas_assumed_role_external_id}"
3535
}
3636
}
3737
}

examples/atlas-encryption-at-rest/aws/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ resource "mongodbatlas_cloud_provider_access_authorization" "auth_role" {
77
project_id = var.project_id
88
role_id = mongodbatlas_cloud_provider_access_setup.setup_only.role_id
99

10-
aws = {
10+
aws {
1111
iam_assumed_role_arn = aws_iam_role.test_role.arn
1212
}
1313
}

0 commit comments

Comments
 (0)