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: aws_cc make cur optional #617

Closed
wants to merge 15 commits into from

Conversation

rssnyder
Copy link
Contributor

Describe your changes

The AWS CC connector type has an optional field for the CUR. The current state of this resource makes this a required field.
image
https://apidocs.harness.io/tag/Connectors#operation/createConnector
https://harness.slack.com/archives/C02GHCDN2JV/p1689087248164719

Tested locally:

Terraform will perform the following actions:

  # harness_platform_connector_awscc.accounts will be created
  + resource "harness_platform_connector_awscc" "accounts" {
      + account_id       = "166719183214"
      + features_enabled = [
          + "GOVERNANCE",
          + "VISIBILITY",
        ]
      + id               = (known after apply)
      + identifier       = "aws166719183214"
      + name             = "lz-test-plat"

      + cross_account_access {
          + external_id = "harness:891928451355:pC_7h33wQTeZ_j-libvF4A"
          + role_arn    = "arn:aws:iam::166719183214:role/HarnessCERole"
        }
    }

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

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

harness_platform_connector_awscc.accounts: Creating...
harness_platform_connector_awscc.accounts: Creation complete after 0s [id=aws166719183214]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
tf import harness_platform_connector_awscc.accounts aws166719183214
harness_platform_connector_awscc.accounts: Importing from ID "aws166719183214"...
harness_platform_connector_awscc.accounts: Import prepared!
  Prepared harness_platform_connector_awscc for import
harness_platform_connector_awscc.accounts: Refreshing state... [id=aws166719183214]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

➜  test tf apply
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - harness/harness in /Users/rileysnyder/git/terraform-provider-harness
│ 
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
harness_platform_connector_awscc.accounts: Refreshing state... [id=aws166719183214]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Comment Triggers

PR Check triggers
  • Build: trigger build
  • Sub Category Field Check: trigger subcategoryfieldcheck

@Rohit-Kaliki
Copy link
Contributor

trigger build

@Rohit-Kaliki
Copy link
Contributor

trigger subcategoryfieldcheck

RajBaviskar
RajBaviskar previously approved these changes Aug 1, 2023
Copy link
Collaborator

@rathodmeetsatish rathodmeetsatish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikunj-badjatya @Rohit-Kaliki @RajBaviskar there is schema change so this will require doc update as well and dont we need any new tests to test these changes? and have we ran existing tests on one of the prod account? and please also add changelog file

@rssnyder
Copy link
Contributor Author

@nikunj-badjatya @Rohit-Kaliki @RajBaviskar @rathodmeetsatish I made an attempt at adding tests and updating the docs to show the now optional fields. Can I get a review?

@rssnyder
Copy link
Contributor Author

trigger build

@rssnyder
Copy link
Contributor Author

trigger subcategoryfieldcheck

Copy link
Collaborator

@rathodmeetsatish rathodmeetsatish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add changelog file

@rssnyder
Copy link
Contributor Author

trigger build

@rssnyder
Copy link
Contributor Author

trigger subcategoryfieldcheck

@rssnyder
Copy link
Contributor Author

trigger build

@rssnyder
Copy link
Contributor Author

trigger subcategoryfieldcheck

@rssnyder
Copy link
Contributor Author

trigger build

@rssnyder
Copy link
Contributor Author

trigger subcategoryfieldcheck

@rssnyder
Copy link
Contributor Author

rssnyder commented Sep 1, 2023

trigger build

@rssnyder
Copy link
Contributor Author

rssnyder commented Sep 1, 2023

trigger subcategoryfieldcheck

@rssnyder
Copy link
Contributor Author

rssnyder commented Sep 1, 2023

@rathodmeetsatish gitleaks is failing due to this PR being from a fork and not a branch on this repo. Can you force merge or what are my options here?

@rssnyder rssnyder closed this Sep 8, 2023
@rssnyder rssnyder deleted the fix/aws_cc_optional-cur branch September 8, 2023 18:35
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.

5 participants