Skip to content

Commit

Permalink
CDPCP-13398 - credential creation and validation fails due to missing…
Browse files Browse the repository at this point in the history
… fields
  • Loading branch information
gregito committed Nov 21, 2024
1 parent 9feaa0f commit cfc343a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/resources/dw_aws_cluster.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_dw_aws_cluster Resource - terraform-provider-cdp"
subcategory: "Data Warehouse"
subcategory: ""
description: |-
Creates an AWS Data Warehouse cluster.
---
Expand Down
10 changes: 10 additions & 0 deletions docs/resources/environments_aws_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ resource "cdp_environments_aws_credential" "example" {
credential_name = "example-cdp-aws-credential"
role_arn = "arn:aws:iam::11111111111:role/example-cross-account-role"
description = "Example AWS Credentials"
skip_org_policy_decisions = false
verify_permissions = false
}
output "credential_name" {
Expand All @@ -39,6 +41,14 @@ output "role_arn" {
output "crn" {
value = cdp_environments_aws_credential.example.crn
}
output "skip_org_policy_decisions" {
value = cdp_environments_aws_credential.example.skip_org_policy_decisions
}
output "verify_permissions" {
value = cdp_environments_aws_credential.example.verify_permissions
}
```

<!-- schema generated by tfplugindocs -->
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/vw_hive.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cdp_vw_hive Resource - terraform-provider-cdp"
subcategory: "Data Warehouse"
subcategory: ""
description: |-
---
Expand Down
10 changes: 10 additions & 0 deletions examples/resources/cdp_environments_aws_credential/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ resource "cdp_environments_aws_credential" "example" {
credential_name = "example-cdp-aws-credential"
role_arn = "arn:aws:iam::11111111111:role/example-cross-account-role"
description = "Example AWS Credentials"
skip_org_policy_decisions = false
verify_permissions = false
}

output "credential_name" {
Expand All @@ -25,3 +27,11 @@ output "role_arn" {
output "crn" {
value = cdp_environments_aws_credential.example.crn
}

output "skip_org_policy_decisions" {
value = cdp_environments_aws_credential.example.skip_org_policy_decisions
}

output "verify_permissions" {
value = cdp_environments_aws_credential.example.verify_permissions
}
4 changes: 4 additions & 0 deletions resources/environments/resource_aws_credential_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ func testAccAwsCredentialConfig(rName string, roleArn string) string {
resource "cdp_environments_aws_credential" "test" {
credential_name = %[1]q
role_arn = %[2]q
skip_org_policy_decisions = false
verify_permissions = false
}
`, rName, roleArn)
}
Expand All @@ -122,6 +124,8 @@ resource "cdp_environments_aws_credential" "test" {
credential_name = %[1]q
role_arn = %[2]q
description = %[3]q
skip_org_policy_decisions = false
verify_permissions = false
}
`, rName, roleArn, description)
}
Expand Down

0 comments on commit cfc343a

Please sign in to comment.