Skip to content

Commit fa31afe

Browse files
committed
Merge branch 'master' into migration-PR-sdk-test-donot-delete
2 parents 2ba4e77 + c013343 commit fa31afe

File tree

6 files changed

+61
-19
lines changed

6 files changed

+61
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ website/node_modules
2626
*.test
2727
*.iml
2828
.vscode
29+
.env
2930
website/vendor
3031
*.attach
3132
*.xml

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 1.81.1 (August 6, 2025)
2+
3+
## Bug Fixes
4+
5+
### Resource controller
6+
* bypassing scc refresh after deprecation ([6401](https://github.com/IBM-Cloud/terraform-provider-ibm/pull/6401))
7+
8+
### VPC Infrastructure
9+
* prevent 409 errors in is_virtual_endpoint_gateway by locking on VPC ID during create ([6378](https://github.com/IBM-Cloud/terraform-provider-ibm/pull/6378))
10+
11+
12+
113
# 1.81.0 (July 31, 2025)
214

315
* Support for Cloud Internet Services

ibm/service/resourcecontroller/data_source_ibm_resource_instance.go

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ func DataSourceIBMResourceInstanceRead(d *schema.ResourceData, meta interface{})
190190
}
191191
if _, ok := d.GetOk("name"); ok {
192192
name := d.Get("name").(string)
193+
193194
resourceInstanceListOptions := rc.ListResourceInstancesOptions{
194195
Name: &name,
195196
}
@@ -302,12 +303,17 @@ func DataSourceIBMResourceInstanceRead(d *schema.ResourceData, meta interface{})
302303

303304
ID: instance.ResourceID,
304305
}
305-
service, _, err := globalClient.GetCatalogEntry(&options)
306-
if err != nil {
307-
return fmt.Errorf("[ERROR] Error retrieving service offering: %s", err)
308-
}
309306

310-
d.Set("service", service.Name)
307+
// Note: Once the Compliance service (SCC) reaches its end of life, this conditional check can be revisited or safely removed.
308+
if *instance.ResourceID == "compliance" {
309+
d.Set("service", "compliance")
310+
} else {
311+
service, _, err := globalClient.GetCatalogEntry(&options)
312+
if err != nil {
313+
return fmt.Errorf("[ERROR] Error retrieving service offering: %s", err)
314+
}
315+
d.Set("service", service.Name)
316+
}
311317

312318
d.Set(flex.ResourceName, instance.Name)
313319
d.Set(flex.ResourceCRN, instance.CRN)
@@ -354,11 +360,18 @@ func DataSourceIBMResourceInstanceRead(d *schema.ResourceData, meta interface{})
354360

355361
ID: instance.ResourcePlanID,
356362
}
357-
plan, _, err := globalClient.GetCatalogEntry(&planOptions)
358-
if err != nil {
359-
return fmt.Errorf("[ERROR] Error retrieving plan: %s", err)
363+
364+
// Note: Once the Compliance service (SCC) reaches its end of life, this conditional check can be revisited or safely removed.
365+
if *instance.ResourceID == "compliance" {
366+
d.Set("plan", "security-compliance-center-standard-plan")
367+
} else {
368+
plan, _, err := globalClient.GetCatalogEntry(&planOptions)
369+
if err != nil {
370+
return fmt.Errorf("[ERROR] Error retrieving plan: %s", err)
371+
}
372+
d.Set("plan", plan.Name)
360373
}
361-
d.Set("plan", plan.Name)
374+
362375
d.Set("crn", instance.CRN)
363376
tags, err := flex.GetTagsUsingCRN(meta, *instance.CRN)
364377
if err != nil {

ibm/service/resourcecontroller/resource_ibm_resource_instance.go

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -581,13 +581,17 @@ func ResourceIBMResourceInstanceRead(d *schema.ResourceData, meta interface{}) e
581581
}
582582
rsCatRepo := rsCatClient.ResourceCatalog()
583583

584-
serviceOff, err := rsCatRepo.GetServiceName(*instance.ResourceID)
585-
if err != nil {
586-
return fmt.Errorf("[ERROR] Error retrieving service offering: %s", err)
584+
// Note: Once the Compliance service (SCC) reaches its end of life, this conditional check can be revisited or safely removed.
585+
if *instance.ResourceID == "compliance" {
586+
d.Set("service", *instance.ResourceID)
587+
} else {
588+
serviceOff, err := rsCatRepo.GetServiceName(*instance.ResourceID)
589+
if err != nil {
590+
return fmt.Errorf("[ERROR] Error retrieving service offering: %s", err)
591+
}
592+
d.Set("service", serviceOff)
587593
}
588594

589-
d.Set("service", serviceOff)
590-
591595
d.Set(flex.ResourceName, instance.Name)
592596
d.Set(flex.ResourceCRN, instance.CRN)
593597
d.Set(flex.ResourceStatus, instance.State)
@@ -599,11 +603,17 @@ func ResourceIBMResourceInstanceRead(d *schema.ResourceData, meta interface{}) e
599603
}
600604
d.Set(flex.ResourceControllerURL, rcontroller+"/services/")
601605

602-
servicePlan, err := rsCatRepo.GetServicePlanName(*instance.ResourcePlanID)
603-
if err != nil {
604-
return fmt.Errorf("[ERROR] Error retrieving plan: %s", err)
606+
// Note: Once the Compliance service (SCC) reaches its end of life, this conditional check can be revisited or safely removed.
607+
if *instance.ResourceID == "compliance" {
608+
d.Set("plan", "security-compliance-center-standard-plan")
609+
} else {
610+
servicePlan, err := rsCatRepo.GetServicePlanName(*instance.ResourcePlanID)
611+
if err != nil {
612+
return fmt.Errorf("[ERROR] Error retrieving plan: %s", err)
613+
}
614+
d.Set("plan", servicePlan)
605615
}
606-
d.Set("plan", servicePlan)
616+
607617
d.Set("guid", instance.GUID)
608618
// ### Modificataion : Setting "onetime_credentials"
609619
d.Set("onetime_credentials", instance.OnetimeCredentials)

ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"strings"
1212
"time"
1313

14+
"github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns"
1415
"github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex"
1516
"github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate"
1617
"github.com/IBM/go-sdk-core/v5/core"
@@ -337,6 +338,11 @@ func resourceIBMisVirtualEndpointGatewayCreate(context context.Context, d *schem
337338
vpcOpt := &vpcv1.VPCIdentity{
338339
ID: core.StringPtr(vpcID),
339340
}
341+
if vpcID != "" {
342+
isVPCKey := "vpe_vpc_key_" + vpcID
343+
conns.IbmMutexKV.Lock(isVPCKey)
344+
defer conns.IbmMutexKV.Unlock(isVPCKey)
345+
}
340346

341347
// update option
342348
opt := sess.NewCreateEndpointGatewayOptions(targetOpt, vpcOpt)

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
// Version is the current provider main version
8-
const Version = "1.81.0"
8+
const Version = "1.81.1"
99

1010
// GitCommit is the git commit that was compiled. This will be filled in by the compiler.
1111
var GitCommit string

0 commit comments

Comments
 (0)