Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow overwrite_on_create #69

Merged
merged 1 commit into from
Sep 16, 2024
Merged

fix: allow overwrite_on_create #69

merged 1 commit into from
Sep 16, 2024

Conversation

argoyle
Copy link
Member

@argoyle argoyle commented Sep 16, 2024

No description provided.

@peter-svensson
Copy link
Member

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


Terraform Plan 📖success

Show Plan

terraform
module.terraform-aws-k8s-addons-github-runners.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-addons-github-runners]
module.terraform-aws-k8s-addons-cluster-autoscaler.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-addons-cluster-autoscaler]
module.terraform-aws-aurora-mysql.github_repository.repo: Refreshing state... [id=terraform-aws-aurora-mysql]
module.terraform-aws-kops-state-store.github_repository.repo: Refreshing state... [id=terraform-aws-kops-state-store]
module.terraform-aws-aurora-postgresql.github_repository.repo: Refreshing state... [id=terraform-aws-aurora-postgresql]
module.terraform-aws-k8s-argocd-cluster-secret.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-argocd-cluster-secret]
module.terraform-aws-k8s-addons-grafana-agent-operator.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-addons-grafana-agent-operator]
module.terraform-aws-k8s-addons-external-secrets-operator.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-addons-external-secrets-operator]
module.terraform-cloudamqp-rabbitmq.github_repository.repo: Refreshing state... [id=terraform-cloudamqp-rabbitmq]
module.terraform-aws-elasticache-redis.github_repository.repo: Refreshing state... [id=terraform-aws-elasticache-redis]
module.template.github_repository.repo: Refreshing state... [id=tf-template]
module.terraform-aws-k8s-network.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-network]
module.terraform-aws-rds-instance-mysql.github_repository.repo: Refreshing state... [id=terraform-aws-rds-instance-mysql]
module.terraform-aws-k8s-addons-argocd.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-addons-argocd]
module.terraform-aws-k8s.github_repository.repo: Refreshing state... [id=terraform-aws-k8s]
module.terraform-aws-k8s-addons-external-dns.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-addons-external-dns]
module.terraform-aws-k8s-addons-fluentbit.github_repository.repo: Refreshing state... [id=terraform-aws-k8s-addons-fluentbit]
module.terraform-aws-dns-validated-certificate.github_repository.repo: Refreshing state... [id=terraform-aws-dns-validated-certificate]
module.terraform-aws-rds-instance-postgresql.github_repository.repo: Refreshing state... [id=terraform-aws-rds-instance-postgresql]
module.terraform-aws-k8s-addons-github-runners.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGN7J-s4Bycvo]
module.terraform-aws-aurora-postgresql.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGMvXJc4Byb8x]
module.terraform-aws-elasticache-redis.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGN1cCc4Byctu]
module.terraform-aws-k8s-argocd-cluster-secret.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGmRzyc4Bycx3]
module.terraform-aws-kops-state-store.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGMvdvs4Bycx5]
module.terraform-aws-k8s-addons-external-secrets-operator.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGng-n84Bycu4]
module.terraform-aws-k8s-addons-cluster-autoscaler.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOIBlhgc4BycvB]
module.terraform-aws-k8s-addons-grafana-agent-operator.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOHIT5w84BycwF]
module.terraform-aws-aurora-mysql.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGMveJs4Byb9g]
module.terraform-cloudamqp-rabbitmq.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGkwzzs4Byc2F]
module.template.github_repository_file.examples: Refreshing state... [id=tf-template/examples/.gitkeep]
module.template.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOIPw-ls4ByDD8]
module.template.github_repository_file.files[".gitignore"]: Refreshing state... [id=tf-template/.gitignore]
module.template.github_repository_file.files["CODEOWNERS"]: Refreshing state... [id=tf-template/CODEOWNERS]
module.template.github_repository_file.files["Makefile"]: Refreshing state... [id=tf-template/Makefile]
module.template.github_repository_file.github[".github/release.yml"]: Refreshing state... [id=tf-template/.github/release.yml]
module.template.github_repository_file.github[".github/workflows/terrascan.yaml"]: Refreshing state... [id=tf-template/.github/workflows/terrascan.yaml]
module.template.github_repository_file.github[".github/workflows/build.yml"]: Refreshing state... [id=tf-template/.github/workflows/build.yml]
module.template.github_repository_file.github[".github/workflows/commitlint.yaml"]: Refreshing state... [id=tf-template/.github/workflows/commitlint.yaml]
module.template.github_repository_file.github[".github/commitlint.config.js"]: Refreshing state... [id=tf-template/.github/commitlint.config.js]
module.template.github_repository_file.github[".github/dependabot.yml"]: Refreshing state... [id=tf-template/.github/dependabot.yml]
module.template.github_repository_file.github[".github/workflows/conventional-labels.yaml"]: Refreshing state... [id=tf-template/.github/workflows/conventional-labels.yaml]
module.terraform-aws-k8s-network.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGEz1n84Bycx1]
module.terraform-aws-rds-instance-mysql.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGOzCK84Bycx-]
module.terraform-aws-k8s-addons-argocd.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGN5IuM4Bycts]
module.terraform-aws-k8s.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGDcMAs4BycuE]
module.terraform-aws-k8s-addons-external-dns.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGXoYjM4Bycu_]
module.terraform-aws-k8s-addons-fluentbit.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGfsb-s4Bycvj]
module.terraform-aws-dns-validated-certificate.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGNsNLM4Byb86]
module.terraform-aws-rds-instance-postgresql.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOGOzETs4Bycx_]
module.example.github_repository.repo: Refreshing state... [id=example]
module.example.github_branch_protection.repo: Refreshing state... [id=BPR_kwDOIPxQ984ByDG5]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # module.template.github_repository_file.examples will be updated in-place
  ~ resource "github_repository_file" "examples" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/examples/.gitkeep"
        # (11 unchanged attributes hidden)
    }

  # module.template.github_repository_file.files[".gitignore"] will be updated in-place
  ~ resource "github_repository_file" "files" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/.gitignore"
        # (11 unchanged attributes hidden)
    }

  # module.template.github_repository_file.files["CODEOWNERS"] will be updated in-place
  ~ resource "github_repository_file" "files" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/CODEOWNERS"
        # (11 unchanged attributes hidden)
    }

  # module.template.github_repository_file.files["Makefile"] will be updated in-place
  ~ resource "github_repository_file" "files" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/Makefile"
        # (11 unchanged attributes hidden)
    }

  # module.template.github_repository_file.github[".github/commitlint.config.mjs"] will be created
  + resource "github_repository_file" "github" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
      + autocreate_branch_source_sha    = (known after apply)
      + branch                          = "main"
      + commit_author                   = "CI"
      + commit_email                    = "[email protected]"
      + commit_message                  = "chore: update .github/commitlint.config.mjs"
      + commit_sha                      = (known after apply)
      + content                         = <<-EOT
            export default {
              extends: ['@commitlint/config-conventional'],
              /*
               * Any rules defined here will override rules from @commitlint/config-conventional
               */
              rules: {
                'body-max-line-length': [2, 'always', 200],
              },
            };
        EOT
      + file                            = ".github/commitlint.config.mjs"
      + id                              = (known after apply)
      + overwrite_on_create             = true
      + ref                             = (known after apply)
      + repository                      = "tf-template"
      + sha                             = (known after apply)
    }

  # module.template.github_repository_file.github[".github/dependabot.yml"] will be updated in-place
  ~ resource "github_repository_file" "github" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/.github/dependabot.yml"
      ~ overwrite_on_create             = false -> true
        # (10 unchanged attributes hidden)
    }

  # module.template.github_repository_file.github[".github/release.yml"] will be updated in-place
  ~ resource "github_repository_file" "github" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/.github/release.yml"
      ~ overwrite_on_create             = false -> true
        # (10 unchanged attributes hidden)
    }

  # module.template.github_repository_file.github[".github/workflows/build.yml"] will be updated in-place
  ~ resource "github_repository_file" "github" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/.github/workflows/build.yml"
      ~ overwrite_on_create             = false -> true
        # (10 unchanged attributes hidden)
    }

  # module.template.github_repository_file.github[".github/workflows/commitlint.yaml"] will be updated in-place
  ~ resource "github_repository_file" "github" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/.github/workflows/commitlint.yaml"
      ~ overwrite_on_create             = false -> true
        # (10 unchanged attributes hidden)
    }

  # module.template.github_repository_file.github[".github/workflows/conventional-labels.yaml"] will be updated in-place
  ~ resource "github_repository_file" "github" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/.github/workflows/conventional-labels.yaml"
      ~ overwrite_on_create             = false -> true
        # (10 unchanged attributes hidden)
    }

  # module.template.github_repository_file.github[".github/workflows/terrascan.yaml"] will be updated in-place
  ~ resource "github_repository_file" "github" {
      + autocreate_branch               = false
      + autocreate_branch_source_branch = "main"
        id                              = "tf-template/.github/workflows/terrascan.yaml"
      ~ overwrite_on_create             = false -> true
        # (10 unchanged attributes hidden)
    }

Plan: 1 to add, 10 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @argoyle, Action: pull_request, Working Directory: ``, Workflow: Terraform

@argoyle argoyle merged commit 7e51f01 into main Sep 16, 2024
4 checks passed
@argoyle argoyle deleted the allow-overwrite branch September 16, 2024 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants