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

CIS CNAME Setup : Create Partial Zone #3937

Merged

Conversation

arpit-srivastava-ibm
Copy link
Contributor

@arpit-srivastava-ibm arpit-srivastava-ibm commented Jul 28, 2022

CIS CNAME Setup -

  • Added Partial Zone creation option
  • Added 2 new fields in response data for zone - verification_key & cname_suffix

@arpit-srivastava-ibm arpit-srivastava-ibm changed the title Cis partial zone setup CIS CNAME Setup : Create Partial Zone Jul 28, 2022
@arpit-srivastava-ibm
Copy link
Contributor Author

Added new Test case - TestAccIBMCisPartialDomain_basic. All test cases passed.

arpit-mac@Arpits-MacBook-Pro terraform-provider-ibm % make testacc TEST=./ibm/service/cis TESTARGS='-run=TestAccIBMCisPartialDomain_basic'

2022-07-28T15:58:54.041+0530 [DEBUG] sdk.helper_resource: Finished TestCase: test_name=TestAccIBMCisPartialDomain_basic
--- PASS: TestAccIBMCisPartialDomain_basic (298.22s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cis     299.095s

@@ -28,6 +28,12 @@ func DataSourceIBMCISDomain() *schema.Resource {
Description: "CISzone - Domain",
Required: true,
},
cisDomainType: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

In datasource its a conputed not optional with default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected this

@@ -40,6 +53,10 @@ In addition to all argument reference list, you can access the following attribu
- `original_name_servers` - (String) The name servers that were used when the domain was first registered with the DNS Registrar.
- `paused`- (Bool) Indicates if the domain is paused and network traffic bypasses your IBM Cloud Internet Services instance. The default values is **false**.
- `status` - (String) The status of the domain. Valid values are `active`, `pending`, `initializing`, `moved`, `deleted`, and `deactivated`. After creation, the status remains pending until the DNS Registrar is updated with the CIS name servers, exported in the `name_servers` variable.
- `type` - (String) The type of domain to be created. Default value is noted to be `full`- for regular domains, & to create a partial domain for CNAME setup, value to be used is `partial`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Type is optional varaible it should be added under Argument Reference.
Add the doc changes for datasoruce also

Type: schema.TypeString,
Description: "CISzone - Domain Type",
Default: "full",
Optional: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add validator funciton to allow only "full", "partial"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@@ -0,0 +1,10 @@
# This file is maintained automatically by "terraform init".
Copy link
Collaborator

Choose a reason for hiding this comment

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

you need this myExample folder also?

@hkantare hkantare merged commit 832e1c8 into IBM-Cloud:master Aug 9, 2022
SunithaGudisagarIBM pushed a commit to ibm-vpc/terraform-provider-ibm that referenced this pull request Sep 14, 2022
* update the action based on hashicorp/ghaction-import-gpg#11

* CIS CNAME Setup : Create Partial Zone

* addressed comments

* added validator

* removed conflict

* removed unused folder

Co-authored-by: hkantare <hkantare@in.ibm.com>
Co-authored-by: Arpit Srivastava <arpit-mac@Arpits-MacBook-Pro.local>
SunithaGudisagarIBM pushed a commit to ibm-vpc/terraform-provider-ibm that referenced this pull request Sep 14, 2022
* update the action based on hashicorp/ghaction-import-gpg#11

* CIS CNAME Setup : Create Partial Zone

* addressed comments

* added validator

* removed conflict

* removed unused folder

Co-authored-by: hkantare <hkantare@in.ibm.com>
Co-authored-by: Arpit Srivastava <arpit-mac@Arpits-MacBook-Pro.local>
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