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

Generate hierarchical names under argumentDocs in scraped provider metadata #92

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Sep 6, 2022

Description of your changes

Fixes https://github.com/upbound/official-providers/issues/536

This PR proposes new heuristics in the Terraform provider metadata scraper so that the field (Terraform argument & attribute) names under the argumentDocs node will be hierarchical. For example, in the context of https://registry.terraform.io/providers/hashicorp/aws/4.15.1/docs/resources/s3_bucket, instead of generating the following section of the provider metadata file:

argumentDocs:
            ...
            replication_configuration: |
                 A configuration of replication configuration. See Replication Configuration below for details. Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_replication_configuration instead.
            role: ' The ARN of the IAM role for Amazon S3 to assume when replicating the objects.'
            rules: ' Specifies the rules managing the replication .'
            delete_marker_replication_status: ' Whether delete markers are replicated. The only valid value is Enabled. To disable, omit this argument. This argument is only valid with V2 replication configurations .'
            destination: ' Specifies the destination for the rule .'

, which is ambiguous (e.g., there may be multiple destination arguments/attributes under different paths: a.destination, b.destination, etc.)
, we now generate:

argumentDocs:
            ...
            replication_configuration: |
                 A configuration of replication configuration. See Replication Configuration below for details. Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_replication_configuration instead.
            replication_configuration.role: ' The ARN of the IAM role for Amazon S3 to assume when replicating the objects.'
            replication_configuration.rules: ' Specifies the rules managing the replication .'
            replication_configuration.rules.delete_marker_replication_status: ' Whether delete markers are replicated. The only valid value is Enabled. To disable, omit this argument. This argument is only valid with V2 replication configurations .'
            replication_configuration.rules.destination: ' Specifies the destination for the rule .'
            replication_configuration.rules.filter: ' Filter that identifies subset of objects to which the replication rule applies .'
            replication_configuration.rules.filter.prefix: ' Object keyname prefix that identifies subset of objects to which the rule applies. Must be less than or equal to 1024 characters in length.'
            replication_configuration.rules.filter.tags: |
                  A map of tags that identifies subset of objects to which the rule applies.
                The rule applies only to objects having all the tags in its tagset.
            replication_configuration.rules.id: ' Unique identifier for the rule. Must be less than or equal to 255 characters in length.'
            replication_configuration.rules.prefix: ' Object keyname prefix identifying one or more objects to which the rule applies. Must be less than or equal to 1024 characters in length.'
            replication_configuration.rules.priority: ' The priority associated with the rule. Priority should only be set if filter is configured. If not provided, defaults to 0. Priority must be unique between multiple rules.'
            replication_configuration.rules.source_selection_criteria: ' Specifies special object selection criteria .'
            replication_configuration.rules.status: ' The status of the rule. Either Enabled or Disabled. The rule is ignored if status is not Enabled.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Tested with the AWS S3 bucket as follows:

name: hashicorp/terraform-provider-aws
resources:
    aws_s3_bucket:
        subCategory: S3 (Simple Storage)
        description: Provides a S3 bucket resource.
        name: aws_s3_bucket
        title: aws_s3_bucket
        examples:
            - name: b
              manifest: |-
                {
                  "bucket": "my-tf-test-bucket",
                  "tags": {
                    "Environment": "Dev",
                    "Name": "My bucket"
                  }
                }
              dependencies:
                aws_s3_bucket_acl.example: |-
                    {
                      "acl": "private",
                      "bucket": "${aws_s3_bucket.b.id}"
                    }
            - name: b
              manifest: |-
                {
                  "acl": "public-read",
                  "bucket": "s3-website-test.hashicorp.com",
                  "policy": "${file(\"policy.json\")}",
                  "website": [
                    {
                      "error_document": "error.html",
                      "index_document": "index.html",
                      "routing_rules": "[{\n    \"Condition\": {\n        \"KeyPrefixEquals\": \"docs/\"\n    },\n    \"Redirect\": {\n        \"ReplaceKeyPrefixWith\": \"documents/\"\n    }\n}]\n"
                    }
                  ]
                }
            - name: b
              manifest: |-
                {
                  "acl": "public-read",
                  "bucket": "s3-website-test.hashicorp.com",
                  "cors_rule": [
                    {
                      "allowed_headers": [
                        "*"
                      ],
                      "allowed_methods": [
                        "PUT",
                        "POST"
                      ],
                      "allowed_origins": [
                        "https://s3-website-test.hashicorp.com"
                      ],
                      "expose_headers": [
                        "ETag"
                      ],
                      "max_age_seconds": 3000
                    }
                  ]
                }
            - name: b
              manifest: |-
                {
                  "acl": "private",
                  "bucket": "my-tf-test-bucket",
                  "versioning": [
                    {
                      "enabled": true
                    }
                  ]
                }
            - name: log_bucket
              manifest: |-
                {
                  "acl": "log-delivery-write",
                  "bucket": "my-tf-log-bucket"
                }
            - name: b
              manifest: |-
                {
                  "acl": "private",
                  "bucket": "my-tf-test-bucket",
                  "logging": [
                    {
                      "target_bucket": "${aws_s3_bucket.log_bucket.id}",
                      "target_prefix": "log/"
                    }
                  ]
                }
              references:
                logging.target_bucket: aws_s3_bucket.log_bucket.id
            - name: bucket
              manifest: |-
                {
                  "acl": "private",
                  "bucket": "my-bucket",
                  "lifecycle_rule": [
                    {
                      "enabled": true,
                      "expiration": [
                        {
                          "days": 90
                        }
                      ],
                      "id": "log",
                      "prefix": "log/",
                      "tags": {
                        "autoclean": "true",
                        "rule": "log"
                      },
                      "transition": [
                        {
                          "days": 30,
                          "storage_class": "STANDARD_IA"
                        },
                        {
                          "days": 60,
                          "storage_class": "GLACIER"
                        }
                      ]
                    },
                    {
                      "enabled": true,
                      "expiration": [
                        {
                          "date": "2016-01-12"
                        }
                      ],
                      "id": "tmp",
                      "prefix": "tmp/"
                    }
                  ]
                }
            - name: versioning_bucket
              manifest: |-
                {
                  "acl": "private",
                  "bucket": "my-versioning-bucket",
                  "lifecycle_rule": [
                    {
                      "enabled": true,
                      "noncurrent_version_expiration": [
                        {
                          "days": 90
                        }
                      ],
                      "noncurrent_version_transition": [
                        {
                          "days": 30,
                          "storage_class": "STANDARD_IA"
                        },
                        {
                          "days": 60,
                          "storage_class": "GLACIER"
                        }
                      ],
                      "prefix": "config/"
                    }
                  ],
                  "versioning": [
                    {
                      "enabled": true
                    }
                  ]
                }
            - name: example
              manifest: |-
                {
                  "bucket": "my-tf-example-bucket",
                  "object_lock_configuration": [
                    {
                      "object_lock_enabled": "Enabled",
                      "rule": [
                        {
                          "default_retention": [
                            {
                              "days": 5,
                              "mode": "COMPLIANCE"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
            - name: destination
              manifest: |-
                {
                  "bucket": "tf-test-bucket-destination-12345",
                  "versioning": [
                    {
                      "enabled": true
                    }
                  ]
                }
              dependencies:
                aws_iam_policy.replication: |-
                    {
                      "name": "tf-iam-role-policy-replication-12345",
                      "policy": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Action\": [\n        \"s3:GetReplicationConfiguration\",\n        \"s3:ListBucket\"\n      ],\n      \"Effect\": \"Allow\",\n      \"Resource\": [\n        \"${aws_s3_bucket.source.arn}\"\n      ]\n    },\n    {\n      \"Action\": [\n        \"s3:GetObjectVersionForReplication\",\n        \"s3:GetObjectVersionAcl\",\n         \"s3:GetObjectVersionTagging\"\n      ],\n      \"Effect\": \"Allow\",\n      \"Resource\": [\n        \"${aws_s3_bucket.source.arn}/*\"\n      ]\n    },\n    {\n      \"Action\": [\n        \"s3:ReplicateObject\",\n        \"s3:ReplicateDelete\",\n        \"s3:ReplicateTags\"\n      ],\n      \"Effect\": \"Allow\",\n      \"Resource\": \"${aws_s3_bucket.destination.arn}/*\"\n    }\n  ]\n}\n"
                    }
                aws_iam_role.replication: |-
                    {
                      "assume_role_policy": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Action\": \"sts:AssumeRole\",\n      \"Principal\": {\n        \"Service\": \"s3.amazonaws.com\"\n      },\n      \"Effect\": \"Allow\",\n      \"Sid\": \"\"\n    }\n  ]\n}\n",
                      "name": "tf-iam-role-replication-12345"
                    }
                aws_iam_role_policy_attachment.replication: |-
                    {
                      "policy_arn": "${aws_iam_policy.replication.arn}",
                      "role": "${aws_iam_role.replication.name}"
                    }
            - name: source
              manifest: |-
                {
                  "acl": "private",
                  "bucket": "tf-test-bucket-source-12345",
                  "provider": "${aws.central}",
                  "replication_configuration": [
                    {
                      "role": "${aws_iam_role.replication.arn}",
                      "rules": [
                        {
                          "destination": [
                            {
                              "bucket": "${aws_s3_bucket.destination.arn}",
                              "metrics": [
                                {
                                  "minutes": 15,
                                  "status": "Enabled"
                                }
                              ],
                              "replication_time": [
                                {
                                  "minutes": 15,
                                  "status": "Enabled"
                                }
                              ],
                              "storage_class": "STANDARD"
                            }
                          ],
                          "filter": [
                            {
                              "tags": {}
                            }
                          ],
                          "id": "foobar",
                          "status": "Enabled"
                        }
                      ]
                    }
                  ],
                  "versioning": [
                    {
                      "enabled": true
                    }
                  ]
                }
              references:
                provider: aws.central
                replication_configuration.role: aws_iam_role.replication.arn
                replication_configuration.rules.destination.bucket: aws_s3_bucket.destination.arn
              dependencies:
                aws_iam_policy.replication: |-
                    {
                      "name": "tf-iam-role-policy-replication-12345",
                      "policy": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Action\": [\n        \"s3:GetReplicationConfiguration\",\n        \"s3:ListBucket\"\n      ],\n      \"Effect\": \"Allow\",\n      \"Resource\": [\n        \"${aws_s3_bucket.source.arn}\"\n      ]\n    },\n    {\n      \"Action\": [\n        \"s3:GetObjectVersionForReplication\",\n        \"s3:GetObjectVersionAcl\",\n         \"s3:GetObjectVersionTagging\"\n      ],\n      \"Effect\": \"Allow\",\n      \"Resource\": [\n        \"${aws_s3_bucket.source.arn}/*\"\n      ]\n    },\n    {\n      \"Action\": [\n        \"s3:ReplicateObject\",\n        \"s3:ReplicateDelete\",\n        \"s3:ReplicateTags\"\n      ],\n      \"Effect\": \"Allow\",\n      \"Resource\": \"${aws_s3_bucket.destination.arn}/*\"\n    }\n  ]\n}\n"
                    }
                aws_iam_role.replication: |-
                    {
                      "assume_role_policy": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Action\": \"sts:AssumeRole\",\n      \"Principal\": {\n        \"Service\": \"s3.amazonaws.com\"\n      },\n      \"Effect\": \"Allow\",\n      \"Sid\": \"\"\n    }\n  ]\n}\n",
                      "name": "tf-iam-role-replication-12345"
                    }
                aws_iam_role_policy_attachment.replication: |-
                    {
                      "policy_arn": "${aws_iam_policy.replication.arn}",
                      "role": "${aws_iam_role.replication.name}"
                    }
            - name: mybucket
              manifest: |-
                {
                  "bucket": "mybucket",
                  "server_side_encryption_configuration": [
                    {
                      "rule": [
                        {
                          "apply_server_side_encryption_by_default": [
                            {
                              "kms_master_key_id": "${aws_kms_key.mykey.arn}",
                              "sse_algorithm": "aws:kms"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              references:
                server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.kms_master_key_id: aws_kms_key.mykey.arn
              dependencies:
                aws_kms_key.mykey: |-
                    {
                      "deletion_window_in_days": 10,
                      "description": "This key is used to encrypt bucket objects"
                    }
            - name: bucket
              manifest: |-
                {
                  "bucket": "mybucket",
                  "grant": [
                    {
                      "id": "${data.aws_canonical_user_id.current_user.id}",
                      "permissions": [
                        "FULL_CONTROL"
                      ],
                      "type": "CanonicalUser"
                    },
                    {
                      "permissions": [
                        "READ_ACP",
                        "WRITE"
                      ],
                      "type": "Group",
                      "uri": "http://acs.amazonaws.com/groups/s3/LogDelivery"
                    }
                  ]
                }
              references:
                grant.id: data.aws_canonical_user_id.current_user.id
        argumentDocs:
            acceleration_status: |-
                Sets the accelerate configuration of an existing bucket. Can be Enabled or Suspended. Cannot be used in cn-north-1 or us-gov-west-1. Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_accelerate_configuration instead.
            acl: The canned ACL to apply. Valid values are private, public-read, public-read-write, aws-exec-read, authenticated-read, and log-delivery-write. Defaults to private.  Conflicts with grant. Terraform will only perform drift detection if a configuration value is provided. Use the resource aws_s3_bucket_acl instead.
            bucket: The name of the bucket. If omitted, Terraform will assign a random, unique name. Must be lowercase and less than or equal to 63 characters in length. A full list of bucket naming rules may be found here.
            bucket_prefix: Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket. Must be lowercase and less than or equal to 37 characters in length. A full list of bucket naming rules may be found here.
            cors_rule: A rule of Cross-Origin Resource Sharing. See CORS rule below for details. Terraform will only perform drift detection if a configuration value is provided. Use the resource aws_s3_bucket_cors_configuration instead.
            cors_rule.allowed_headers: List of headers allowed.
            cors_rule.allowed_methods: One or more HTTP methods that you allow the origin to execute. Can be GET, PUT, POST, DELETE or HEAD.
            cors_rule.allowed_origins: One or more origins you want customers to be able to access the bucket from.
            cors_rule.expose_headers: One or more headers in the response that you want customers to be able to access from their applications .
            cors_rule.max_age_seconds: Specifies time in seconds that browser can cache the response for a preflight request.
            destination.access_control_translation: Specifies the overrides to use for object owners on replication. Must be used in conjunction with account_id owner override configuration.
            destination.account_id: The Account ID to use for overriding the object owner on replication. Must be used in conjunction with access_control_translation override configuration.
            destination.bucket: The ARN of the S3 bucket where you want Amazon S3 to store replicas of the object identified by the rule.
            destination.metrics: Enables replication metrics  .
            destination.replica_kms_key_id: |-
                Destination KMS encryption key ARN for SSE-KMS replication. Must be used in conjunction with
                sse_kms_encrypted_objects source selection criteria.
            destination.replication_time: Enables S3 Replication Time Control  .
            destination.replication_time.minutes: Threshold within which objects are to be replicated. The only valid value is 15.
            destination.replication_time.status: The status of RTC. Either Enabled or Disabled.
            destination.storage_class: The storage class used to store the object. By default, Amazon S3 uses the storage class of the source object to create the object replica.
            force_destroy: A boolean that indicates all objects  should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.
            grant: An ACL policy grant. See Grant below for details. Conflicts with acl. Terraform will only perform drift detection if a configuration value is provided. Use the resource aws_s3_bucket_acl instead.
            grant.id: Canonical user id to grant for. Used only when type is CanonicalUser.
            grant.permissions: List of permissions to apply for grantee. Valid values are READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL.
            grant.type: Type of grantee to apply for. Valid values are CanonicalUser and Group. AmazonCustomerByEmail is not supported.
            grant.uri: Uri address to grant for. Used only when type is Group.
            lifecycle_rule: |-
                A configuration of object lifecycle management. See Lifecycle Rule below for details. Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_lifecycle_configuration instead.
            lifecycle_rule.abort_incomplete_multipart_upload_days: Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
            lifecycle_rule.enabled: Specifies lifecycle rule status.
            lifecycle_rule.expiration: Specifies a period in the object's expire. See Expiration below for details.
            lifecycle_rule.expiration.date: Specifies the date after which you want the corresponding action to take effect.
            lifecycle_rule.expiration.days: Specifies the number of days after object creation when the specific rule action takes effect.
            lifecycle_rule.expiration.expired_object_delete_marker: On a versioned bucket , you can add this element in the lifecycle configuration to direct Amazon S3 to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
            lifecycle_rule.id: Unique identifier for the rule. Must be less than or equal to 255 characters in length.
            lifecycle_rule.noncurrent_version_expiration: Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
            lifecycle_rule.noncurrent_version_transition: Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
            lifecycle_rule.prefix: Object key prefix identifying one or more objects to which the rule applies.
            lifecycle_rule.tags: Specifies object tags key and value.
            lifecycle_rule.transition: Specifies a period in the object's transitions. See Transition below for details.
            logging: |-
                A configuration of S3 bucket logging parameters. See Logging below for details. Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_logging instead.
            logging.target_bucket: The name of the bucket that will receive the log objects.
            logging.target_prefix: To specify a key prefix for log objects.
            metrics.minutes: Threshold within which objects are to be replicated. The only valid value is 15.
            metrics.status: The status of replication metrics. Either Enabled or Disabled.
            noncurrent_version_expiration.storage_class: Specifies the Amazon S3 storage class to which you want the object to transition.
            object_lock_configuration: |-
                A configuration of S3 object locking. See Object Lock Configuration below for details.
                Terraform wil only perform drift detection if a configuration value is provided.
                Use the object_lock_enabled parameter and the resource aws_s3_bucket_object_lock_configuration instead.
            object_lock_configuration.object_lock_enabled: Indicates whether this bucket has an Object Lock configuration enabled. Valid value is Enabled. Use the top-level argument object_lock_enabled instead.
            object_lock_configuration.rule: The Object Lock rule in place for this bucket .
            object_lock_configuration.rule.default_retention: The default retention period that you want to apply to new objects placed in this bucket .
            object_lock_configuration.rule.default_retention.days: The number of days that you want to specify for the default retention period.
            object_lock_configuration.rule.default_retention.mode: The default Object Lock retention mode you want to apply to new objects placed in this bucket. Valid values are GOVERNANCE and COMPLIANCE.
            object_lock_configuration.rule.default_retention.years: The number of years that you want to specify for the default retention period.
            object_lock_enabled: Indicates whether this bucket has an Object Lock configuration enabled. Valid values are true or false.
            policy: |-
                A valid bucket policy JSON document. Note that if the policy document is not specific enough , Terraform may view the policy as constantly changing in a terraform plan. In this case, please make sure you use the verbose/specific version of the policy. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide.
                Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_policy instead.
            replication_configuration: |-
                A configuration of replication configuration. See Replication Configuration below for details. Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_replication_configuration instead.
            replication_configuration.role: The ARN of the IAM role for Amazon S3 to assume when replicating the objects.
            replication_configuration.rules: Specifies the rules managing the replication .
            replication_configuration.rules.delete_marker_replication_status: Whether delete markers are replicated. The only valid value is Enabled. To disable, omit this argument. This argument is only valid with V2 replication configurations .
            replication_configuration.rules.destination: Specifies the destination for the rule .
            replication_configuration.rules.filter: Filter that identifies subset of objects to which the replication rule applies .
            replication_configuration.rules.filter.prefix: Object keyname prefix that identifies subset of objects to which the rule applies. Must be less than or equal to 1024 characters in length.
            replication_configuration.rules.filter.tags: |-
                A map of tags that identifies subset of objects to which the rule applies.
                The rule applies only to objects having all the tags in its tagset.
            replication_configuration.rules.id: Unique identifier for the rule. Must be less than or equal to 255 characters in length.
            replication_configuration.rules.prefix: Object keyname prefix identifying one or more objects to which the rule applies. Must be less than or equal to 1024 characters in length.
            replication_configuration.rules.priority: The priority associated with the rule. Priority should only be set if filter is configured. If not provided, defaults to 0. Priority must be unique between multiple rules.
            replication_configuration.rules.source_selection_criteria: Specifies special object selection criteria .
            replication_configuration.rules.status: The status of the rule. Either Enabled or Disabled. The rule is ignored if status is not Enabled.
            request_payer: |-
                Specifies who should bear the cost of Amazon S3 data transfer.
                Can be either BucketOwner or Requester. By default, the owner of the S3 bucket would incur the costs of any data transfer.
                See Requester Pays Buckets developer guide for more information.
                Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_request_payment_configuration instead.
            server_side_encryption_configuration: |-
                A configuration of server-side encryption configuration. See Server Side Encryption Configuration below for details.
                Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_server_side_encryption_configuration instead.
            server_side_encryption_configuration.rule: A single object for server-side encryption by default configuration.
            server_side_encryption_configuration.rule.apply_server_side_encryption_by_default: A single object for setting server-side encryption by default.
            server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.kms_master_key_id: The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of sse_algorithm as aws:kms. The default aws/s3 AWS KMS master key is used if this element is absent while the sse_algorithm is aws:kms.
            server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.sse_algorithm: The server-side encryption algorithm to use. Valid values are AES256 and aws:kms
            server_side_encryption_configuration.rule.bucket_key_enabled: Whether or not to use Amazon S3 Bucket Keys for SSE-KMS.
            source_selection_criteria.sse_kms_encrypted_objects: |-
                Match SSE-KMS encrypted objects . If specified, replica_kms_key_id
                in destination must be specified as well.
            source_selection_criteria.sse_kms_encrypted_objects.enabled: Boolean which indicates if this criteria is enabled.
            tags: A map of tags to assign to the bucket. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
            transition.date: Specifies the date after which you want the corresponding action to take effect.
            transition.days: Specifies the number of days after object creation when the specific rule action takes effect.
            transition.storage_class: Specifies the Amazon S3 storage class to which you want the object to transition.
            versioning: A configuration of the S3 bucket versioning state. See Versioning below for details. Terraform will only perform drift detection if a configuration value is provided. Use the resource aws_s3_bucket_versioning instead.
            versioning.enabled: Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
            versioning.mfa_delete: Enable MFA delete for either Change the versioning state of your bucket or Permanently delete an object version. Default is false. This cannot be used to toggle this setting but is available to allow managed buckets to reflect the state in AWS
            website: |-
                A configuration of the S3 bucket website. See Website below for details. Terraform will only perform drift detection if a configuration value is provided.
                Use the resource aws_s3_bucket_website_configuration instead.
            website.arn: The ARN of the bucket. Will be of format arn:aws:s3:::bucketname.
            website.bucket_domain_name: The bucket domain name. Will be of format bucketname.s3.amazonaws.com.
            website.bucket_regional_domain_name: 'The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL.'
            website.error_document: An absolute path to the document to return in case of a 4XX error.
            website.hosted_zone_id: The Route 53 Hosted Zone ID for this bucket's region.
            website.id: The name of the bucket.
            website.index_document: Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders.
            website.redirect_all_requests_to: A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol  to use when redirecting requests. The default is the protocol that is used in the original request.
            website.region: The AWS region this bucket resides in.
            website.routing_rules: |-
                A json array containing routing rules
                describing redirect behavior and when redirects are applied.
            website.tags_all: A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
            website.website_domain: The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
            website.website_endpoint: The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
        importStatements: []

@ulucinar ulucinar marked this pull request as draft September 6, 2022 23:11
@ulucinar ulucinar changed the title Generate hierarchical names for argumentDocs in scraped provider metadata Generate hierarchical names under argumentDocs in scraped provider metadata Sep 6, 2022
@ulucinar ulucinar marked this pull request as ready for review September 7, 2022 16:32
@ulucinar ulucinar force-pushed the fix-providers-536 branch 3 times, most recently from f1003bd to 7561401 Compare September 8, 2022 10:35
Copy link
Member

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

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

Thanks @ulucinar I left a few comments.

pkg/types/field.go Show resolved Hide resolved
pkg/types/field.go Outdated Show resolved Hide resolved
pkg/types/field.go Show resolved Hide resolved
pkg/types/field.go Outdated Show resolved Hide resolved
@ulucinar ulucinar force-pushed the fix-providers-536 branch 2 times, most recently from 4d6fb77 to cfc09af Compare September 12, 2022 16:25
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Copy link
Member

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

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

Thanks @ulucinar LGTM!

@ulucinar ulucinar merged commit 4bae257 into crossplane:main Sep 12, 2022
@ulucinar ulucinar deleted the fix-providers-536 branch September 12, 2022 16:38
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