Last active
December 26, 2019 17:53
-
-
Save mingfang/a224c04d8df9a066efe8291f40b715bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: 1.0.0 | |
metadata: | |
name: terraform-provider-k8s | |
projects: | |
- name: terraform-provider-k8s | |
source: | |
location: 'https://github.com/mingfang/terraform-provider-k8s.git' | |
type: git | |
clonePath: src/github.com/mingfang/terraform-provider-k8s/ | |
- name: terraform-k8s-modules | |
source: | |
location: 'https://github.com/mingfang/terraform-k8s-modules.git' | |
type: git | |
components: | |
- alias: terraform | |
type: kubernetes | |
referenceContent: | | |
apiVersion: v1 | |
kind: List | |
items: | |
- apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: terraform | |
spec: | |
containers: | |
- name: terraform | |
image: registry.rebelsoft.com/terraform-provider-k8s | |
command: [sleep, infinity] | |
env: | |
- name: HOME | |
value: /projects | |
- name: TF_VAR_namespace | |
#uncomment line below to hack around the problem | |
#value: "" | |
valueFrom: | |
fieldRef: | |
apiVersion: v1 | |
fieldPath: metadata.namespace | |
resources: | |
limits: | |
memory: 2048Mi | |
volumeMounts: | |
- mountPath: /projects | |
name: projects | |
volumes: | |
- name: projects | |
persistentVolumeClaim: | |
claimName: projects | |
- apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: projects | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 2Gi | |
- alias: go-cli | |
type: dockerimage | |
image: 'quay.io/eclipse/che-golang-1.12:7.6.0' | |
env: | |
- value: '/go:$(CHE_PROJECTS_ROOT)' | |
name: GOPATH | |
- value: /tmp/.cache | |
name: GOCACHE | |
- value: 'on' | |
name: GO111MODULE | |
mountSources: true | |
memoryLimit: 2048Mi | |
- id: redhat/vscode-yaml/latest | |
type: chePlugin | |
- id: ms-vscode/go/latest | |
alias: go-plugin | |
type: chePlugin | |
commands: | |
- name: build | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/src/github.com/mingfang/terraform-provider-k8s/' | |
type: exec | |
command: >- | |
go build -o | |
${CHE_PROJECTS_ROOT}/.terraform.d/plugins/terraform-provider-k8s_v1.0.0 | |
component: go-cli | |
- name: terraform fmt | |
actions: | |
- workdir: '${fileDirname}' | |
type: exec | |
command: pwd; terraform fmt | |
component: terraform | |
- name: terraform init | |
actions: | |
- workdir: '${fileDirname}' | |
type: exec | |
command: pwd; terraform init | |
component: terraform | |
- name: terraform plan | |
actions: | |
- workdir: '${fileDirname}' | |
type: exec | |
command: pwd; terraform plan | |
component: terraform | |
- name: terraform apply -auto-approve | |
actions: | |
- workdir: '${fileDirname}' | |
type: exec | |
command: pwd; terraform apply -auto-approve | |
component: terraform | |
- name: terraform destroy -auto-approve | |
actions: | |
- workdir: '${fileDirname}' | |
type: exec | |
command: pwd; terraform destroy -auto-approve | |
component: terraform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment