Skip to content

Commit e7c8857

Browse files
Fix: Non-home region tag error
Tag and tag namespaces are identity resources and need to be created from the home region.
1 parent 85876a6 commit e7c8857

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

identity.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,35 +162,41 @@ resource "oci_identity_policy" "HydrationAgentPolicy" {
162162
}
163163

164164
resource "oci_identity_tag_namespace" "CloudMigrations" {
165+
provider = oci.homeregion
165166
name = "CloudMigrations"
166167
description = "Used to track resources created by Oracle Cloud Migrations service."
167168
compartment_id = var.tenancy_ocid
168169
}
169170

170171
resource "oci_identity_tag" "ServiceUse" {
172+
provider = oci.homeregion
171173
name = "ServiceUse"
172174
description = "Oracle Cloud Migrations service"
173175
tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id
174176
}
175177

176178
resource "oci_identity_tag" "SourceEnvironmentId" {
179+
provider = oci.homeregion
177180
name = "SourceEnvironmentId"
178181
description = "Source Environment OCID"
179182
tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id
180183
}
181184
resource "oci_identity_tag" "SourceEnvironmentType" {
185+
provider = oci.homeregion
182186
name = "SourceEnvironmentType"
183187
description = "Source Environment Type"
184188
tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id
185189
}
186190

187191
resource "oci_identity_tag" "SourceAssetId" {
192+
provider = oci.homeregion
188193
name = "SourceAssetId"
189194
description = "Asset Source OCID"
190195
tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id
191196
}
192197

193198
resource "oci_identity_tag" "MigrationProject" {
199+
provider = oci.homeregion
194200
name = "MigrationProject"
195201
description = "Migration Project OCID"
196202
tag_namespace_id = oci_identity_tag_namespace.CloudMigrations.id

0 commit comments

Comments
 (0)