terraform config to create woodpecker ci cache storage on oci
Go to file
2024-05-28 15:12:58 +06:00
.envrc.sample init (resources creation ok) 2024-05-28 15:02:15 +06:00
.gitignore init (resources creation ok) 2024-05-28 15:02:15 +06:00
.pre-commit-config.yaml add pre-commit 2024-05-28 15:03:34 +06:00
.terraform-docs.yml init (resources creation ok) 2024-05-28 15:02:15 +06:00
.terraform-version init (resources creation ok) 2024-05-28 15:02:15 +06:00
.terraform.lock.hcl init (resources creation ok) 2024-05-28 15:02:15 +06:00
oci.iam.tf init (resources creation ok) 2024-05-28 15:02:15 +06:00
oci.objectstorage.tf init (resources creation ok) 2024-05-28 15:02:15 +06:00
README.md update terraform-docs 2024-05-28 15:12:58 +06:00
terraform.backend.tfvars.sample init (resources creation ok) 2024-05-28 15:02:15 +06:00
terraform.data.tf init (resources creation ok) 2024-05-28 15:02:15 +06:00
terraform.locals.tf init (resources creation ok) 2024-05-28 15:02:15 +06:00
terraform.outputs.tf init (resources creation ok) 2024-05-28 15:02:15 +06:00
terraform.tf init (resources creation ok) 2024-05-28 15:02:15 +06:00
terraform.tfvars.sample init (resources creation ok) 2024-05-28 15:02:15 +06:00
terraform.variables.tf init (resources creation ok) 2024-05-28 15:02:15 +06:00

oci woodpecker cache

sets up a cache bucket on oci for use with woodpecker ci.

depends on terraform-oci-free.

Usage

terraform init -backend-config=terraform.backend.tfvars
terraform apply -var-file=terraform.tfvars

Collect the output values and create woodpecker ci user-level variables, eg:

CACHE_S3_ENDPOINT: <s3_endpoint>
CACHE_S3_BUCKET: <s3_bucket_name>
CACHE_S3_ACCESS_KEY_ID: <s3_access_key_id>
CACHE_S3_SECRET_ACCESS_KEY: <s3_secret_access_key>
CACHE_USE_PATH_STYLE: true

these variables can then be used with the drone-cache plugin in a woodpecker ci pipeline.

Terraform Docs

Requirements

Name Version
terraform ~> 1.8.0
oci ~> 5.42.0

Providers

Name Version
oci 5.42.0
terraform n/a

Modules

No modules.

Resources

Name Type
oci_identity_customer_secret_key.woodpecker_cache resource
oci_identity_group.woodpecker_cache resource
oci_identity_policy.woodpecker_cache resource
oci_identity_user.woodpecker_cache resource
oci_identity_user_capabilities_management.woodpecker_cache resource
oci_identity_user_group_membership.woodpecker_cache resource
oci_objectstorage_bucket.woodpecker_cache resource
oci_objectstorage_object_lifecycle_policy.woodpecker_cache resource
oci_objectstorage_namespace.ns data source
terraform_remote_state.base data source

Inputs

Name Description Type Default Required
oci_region n/a string n/a yes
remote_state_config The configuration of the remote state backend to fetch the compartment_id from any n/a yes
remote_state_type The type of the remote state backend to fetch the compartment_id from string n/a yes
iac_component Component name of the iac config. used in various tags and metadata. string "oci-woodpecker-cache" no
iac_source Source of the iac config. used in various tags and metadata. string "git@git.bdeshi.space:bdeshi/terraform-oci-woodpecker-cache.git" no

Outputs

Name Description
s3_accss_key_id n/a
s3_bucket_name n/a
s3_endpoint n/a
s3_secret_access_key n/a
s3_use_path_style Use path style access for S3. This is necessary for OCI object storage.