Skip to content

Error in cluster_ipv6 policy #1006

@hyder

Description

@hyder

Affected Resource(s)

resource "oci_identity_policy" "cluster_ipv6" {
  provider       = oci.home
  count          = var.enable_ipv6 && var.create_iam_resources ? 1 : 0
  compartment_id = var.network_compartment_id
  description    = format("Policies for OKE Terraform state %v", var.state_id)
  name           = var.policy_name
  statements     = [format("Allow any-user to use ipv6s in compartment %s where all { request.principal.id = '%s' }", var.network_compartment_id, var.cluster_id )]
  defined_tags   = local.defined_tags
  freeform_tags  = local.freeform_tags
  lifecycle {
    ignore_changes = [defined_tags, freeform_tags]
  }
}

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform plan
│ Error: Error in function call
│
│   on modules/iam/policy.tf line 40, in resource "oci_identity_policy" "cluster_ipv6":
│   40:   statements     = [format("Allow any-user to use ipv6s in compartment %s where all { request.principal.id = '%s' }", var.network_compartment_id, var.cluster_id )]
│     ├────────────────
│     │ while calling format(format, args...)
│     │ var.cluster_id is null
│     │ var.network_compartment_id is null
│
│ Call to function "format" failed: unsupported value for "%s" at 43: null value cannot be formatted.```

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions