Skip to content

Commit 3fed088

Browse files
authored
fix enterprise example (#215)
1 parent f4ee284 commit 3fed088

File tree

2 files changed

+4
-121
lines changed

2 files changed

+4
-121
lines changed

examples/enterprise/README.md

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -53,120 +53,3 @@ terraform apply
5353
```
5454

5555
---
56-
57-
## Known issue
58-
59-
There is a [known issue](https://github.com/IBM-Cloud/terraform-provider-ibm/issues/6164) which you will face if you attempt a re-apply of this example after the initial apply has complete.
60-
61-
- The `ibm_iam_trusted_profile_template` will detect a update in place which looks something like this:
62-
```
63-
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
64-
~ update in-place
65-
66-
Terraform will perform the following actions:
67-
68-
# module.trusted_profile_template.ibm_iam_trusted_profile_template.trusted_profile_template_instance will be updated in-place
69-
~ resource "ibm_iam_trusted_profile_template" "trusted_profile_template_instance" {
70-
id = "ProfileTemplate-8b16cb82-b9b4-434a-b678-12c82033e9a7/1"
71-
name = "Trusted Profile Template for SCC-WP"
72-
# (11 unchanged attributes hidden)
73-
74-
~ profile {
75-
name = "Trusted Profile for IBM Cloud CSPM in SCC-WP"
76-
# (1 unchanged attribute hidden)
77-
78-
~ identities {
79-
~ iam_id = "crn-crn:v1:bluemix:public:apprapp:us-south:a/1f27e30e31f0486980cb0b2657d483f7:c89c16ce-3505-453e-8990-c7473657779b::" -> "crn:v1:bluemix:public:apprapp:us-south:a/1f27e30e31f0486980cb0b2657d483f7:c89c16ce-3505-453e-8990-c7473657779b::"
80-
# (4 unchanged attributes hidden)
81-
}
82-
}
83-
84-
# (2 unchanged blocks hidden)
85-
}
86-
```
87-
- Any account groups that were assigned the trusted profile template will also see an update in place. For example:
88-
```
89-
# module.trusted_profile_template.ibm_iam_trusted_profile_template_assignment.account_settings_template_assignment_instance["AccountGroup-3596923e5a674a7fa7eb01c5b17fce8e"] will be updated in-place
90-
~ resource "ibm_iam_trusted_profile_template_assignment" "account_settings_template_assignment_instance" {
91-
id = "TemplateAssignment-befcf82f-6bd2-4922-b2c1-5c161685488c"
92-
+ resources = (known after apply)
93-
# (13 unchanged attributes hidden)
94-
}
95-
```
96-
- If you then proceed with the apply, it will fail with the following error:
97-
```
98-
module.trusted_profile_template.ibm_iam_trusted_profile_template.trusted_profile_template_instance: Modifying... [id=ProfileTemplate-8b16cb82-b9b4-434a-b678-12c82033e9a7/1]
99-
100-
│ Error: UpdateProfileTemplateVersionWithContext failed Template in committed state.
101-
│ {
102-
│ "StatusCode": 422,
103-
│ "Headers": {
104-
│ "Akamai-Grn": [
105-
│ "0.bdb01302.1744900183.cacb5e65"
106-
│ ],
107-
│ "Cache-Control": [
108-
│ "no-cache, no-store, must-revalidate"
109-
│ ],
110-
│ "Content-Language": [
111-
│ "en-US"
112-
│ ],
113-
│ "Content-Length": [
114-
│ "334"
115-
│ ],
116-
│ "Content-Type": [
117-
│ "application/json"
118-
│ ],
119-
│ "Date": [
120-
│ "Thu, 17 Apr 2025 14:29:43 GMT"
121-
│ ],
122-
│ "Expires": [
123-
│ "0"
124-
│ ],
125-
│ "Ibm-Cloud-Service-Name": [
126-
│ "iam-identity"
127-
│ ],
128-
│ "Pragma": [
129-
│ "no-cache"
130-
│ ],
131-
│ "Set-Cookie": [
132-
│ "ak_bmsc=540034860F090FE00019133754696C9B~000000000000000000000000000000~YAAQvbATAmL0BRuWAQAA59YnRBuMehleeYJJD1yOUDM/362Yj0eaMmjUwIsm8G4Muf/XUfjIHA5XJGWRI1lc21CDcPI7yVqdHcX5h4l59hxg+cqzHDBeNUIojafPY7k82U8X9ECSo5XFuyfFx4tlSOVclDZ05o2vLfNlpsi+Gr8kBbwySy/XGjfPi5g0ZLRq1Segl+vK7mV2HNdboRRw2MKdZpxYUgIrx/WhFgsuIgZBx6xzDLVjLYZHfFhZ1pF/s/vgOC9pPv8oAOxbas8pvR0hfeL4/9tNLiqws2kMal8wDeuytpy0qEzFLvlFRTa9YG0GYXthz5MxlA/VX5fnxfPcc7SGW2dTu1JFYKig/SapnDnqJCo/n/YlJLrjfguPWQjK; Domain=.cloud.ibm.com; Path=/; Expires=Thu, 17 Apr 2025 16:29:43 GMT; Max-Age=7200"
133-
│ ],
134-
│ "Strict-Transport-Security": [
135-
│ "max-age=31536000; includeSubDomains"
136-
│ ],
137-
│ "Transaction-Id": [
138-
│ "OXRxZ2M-8c573b755d4f4a28bb60756766ea1c64"
139-
│ ],
140-
│ "X-Content-Type-Options": [
141-
│ "nosniff"
142-
│ ],
143-
│ "X-Correlation-Id": [
144-
│ "OXRxZ2M-8c573b755d4f4a28bb60756766ea1c64"
145-
│ ],
146-
│ "X-Proxy-Upstream-Service-Time": [
147-
│ "127"
148-
│ ],
149-
│ "X-Request-Id": [
150-
│ "81085e6c-1d77-4916-84c5-e4574956e456"
151-
│ ]
152-
│ },
153-
│ "Result": {
154-
│ "errors": [
155-
│ {
156-
│ "code": "invalid_state",
157-
│ "details": "Unable to process this request as Template with ID 'ProfileTemplate-8b16cb82-b9b4-434a-b678-12c82033e9a7' and version '1' is in a committed state.",
158-
│ "message": "Template in committed state.",
159-
│ "message_code": "BXNIM0908E"
160-
│ }
161-
│ ],
162-
│ "status_code": 422,
163-
│ "trace": "OXRxZ2M-8c573b755d4f4a28bb60756766ea1c64"
164-
│ },
165-
│ "RawResult": null
166-
│ }
167-
168-
169-
│ with module.trusted_profile_template.ibm_iam_trusted_profile_template.trusted_profile_template_instance,
170-
│ on .terraform/modules/trusted_profile_template/modules/trusted-profile-template/main.tf line 26, in resource "ibm_iam_trusted_profile_template" "trusted_profile_template_instance":
171-
│ 26: resource "ibm_iam_trusted_profile_template" "trusted_profile_template_instance" {
172-
```

examples/enterprise/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module "scc_wp" {
2727
# Create Trusted profile for SCC Workload Protection instance
2828
module "trusted_profile_scc_wp" {
2929
source = "terraform-ibm-modules/trusted-profile/ibm"
30-
version = "2.1.0"
30+
version = "2.1.1"
3131
trusted_profile_name = "${var.prefix}-scc-wp-profile"
3232
trusted_profile_description = "Trusted Profile for SCC-WP to access App Config and enterprise"
3333

@@ -78,7 +78,7 @@ module "app_config" {
7878
# Create trusted profile for App Config instance
7979
module "trusted_profile_app_config_general" {
8080
source = "terraform-ibm-modules/trusted-profile/ibm"
81-
version = "2.1.0"
81+
version = "2.1.1"
8282
trusted_profile_name = "${var.prefix}-app-config-general-profile"
8383
trusted_profile_description = "Trusted Profile for App Config general permissions"
8484

@@ -130,7 +130,7 @@ resource "ibm_iam_custom_role" "template_assignment_reader" {
130130
# Trusted Profile for App Config enterprise-level permissions
131131
module "trusted_profile_app_config_enterprise" {
132132
source = "terraform-ibm-modules/trusted-profile/ibm"
133-
version = "2.1.0"
133+
version = "2.1.1"
134134
trusted_profile_name = "${var.prefix}-app-config-enterprise-profile"
135135
trusted_profile_description = "Trusted Profile for App Config to manage IAM templates"
136136

@@ -172,7 +172,7 @@ module "trusted_profile_app_config_enterprise" {
172172

173173
module "trusted_profile_template" {
174174
source = "terraform-ibm-modules/trusted-profile/ibm//modules/trusted-profile-template"
175-
version = "2.1.0"
175+
version = "2.1.1"
176176
template_name = "Trusted Profile Template for SCC-WP-${var.prefix}"
177177
template_description = "IAM trusted profile template to onboard accounts for CSPM"
178178
profile_name = "Trusted Profile for IBM Cloud CSPM in SCC-WP-${var.prefix}"

0 commit comments

Comments
 (0)